How to block Facebook and other domains with the Hosts file in Mac OS X:
This works in all versions of Mac OS X.
- Launch the Terminal, located in /Applications/Utilities/
- At the command line, type: sudo open /etc/hosts
- Enter your administrative password when asked
- TextEdit will now launch with /etc/hosts open, you need to add the following lines to the bottom of the file
127.0.0.1 facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 www.facebook.com
- Each one of those entries must be on it’s own line. Save the file when it’s finished editing
- Now you need to flush the DNS cache for changes to take effect, type the following command in the Terminal: dscacheutil -flushcache
- Try to access facebook, it should no longer work
If you remove the entires from the /etc/hosts file you will be able to access Facebook again as usual.
Leave A Comment
Related Posts
Category: Hardware
This EleTab Dual Monitor Mount stand gives you back your desk by eliminating the stands from both of your monitors. This EleTab Dual Monitor [...]
Category: Hardware
I've been a fan of Dell monitors for a while now, currently I use three Dell Monitors connected to a Mac mini. Two of them [...]
Category: General
A client had been maintaining their own WordPress website and decided to update the Elementor Pro plugin. Now, the site had not been touched [...]