Adblocking is a non-trivial task, but there are trivial solutions.
1.) Install hosts-gen from http://git.r-36.net/hosts-gen/
% git clone http://git.r-36.net/hosts-gen
% cd hosts-gen
% sudo make install
# Make sure all your custom configuration from your current /etc/hosts is
# preserved in a file in /etc/hosts.d. The files have to begin with a
# number, a minus and then the name.
% sudo hosts-gen
2.) Install the zerohosts script.
# In the above directory.
% sudo cp examples/gethostszero /bin
% sudo chmod 775 /bin/gethostszero
% sudo /bin/gethostszero
% sudo hosts-gen
Add a cron job, and enjoy your faster and adfree-er internet. Further, you can add your custom (this FB) block to the local files in /etc/hosts.d, which then will be concatenated automatically.
[source]: https://surf.suckless.org/files/adblock-hosts/