I had a friend ask me the other day how to edit his hosts file for local development. It's something I take for granted because I'm so used to doing it, but for him it was something he hadn't done before. # Use arrow keys to move to what you want. I decided I'd throw together a quick 60 second video on how to do it...
Here are the commands I used...
sudo vim /etc/hosts
i for entering edit mode, move your cursor to where you want to edit. Enter the IP address and the hostname.
escape to exit insert mode,
wq to save and quit.