Editing MacOS Hosts File in Terminal Ok, so I don’t forget this again… sudo nano /private/etc/hosts Maybe someone else will find that helpful.