I’ve had windows for years; I knew the OS inside out. Recently, I switched to Mac. But I wondered how to edit the hosts file for my VPN connections and my servers. After some research, I found out how to do it and thought I will document it on PeteNetLive! 🙂
Solution
Open a terminal session and type in the following command;
[box]Sudo nano /etc/hosts[/box]
Note: I’m using nano for this but you can use vi to edit the document (sudo vi /etc/hosts).
You’ll be prompted to enter your password.
Then you will get this screen;
Type in an entry for example (Note: This is not my IP or my company’s IP!);
To Save, Press Control and O and Enter.
To Exit, press Control and X.
Related Articles, References, Credits, or External Links
If you have a complicated network, you can spend more time finding out how it’s configured, than actually doing any work on it!
Today I had a client that needed some changes made on their LAN, I knew their name, and their network address, and common sense told me which of the core switches they were connected to.