> ## Content Index
> Fetch the complete content index at: https://www.jonathancreamer.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to quickly edit your hosts file on macOS
- URL: https://www.jonathancreamer.com/how-to-quickly-edit-your-hosts-file-on-macos/
- Published: 2017-01-17T21:34:58.000Z
- Updated: 2017-01-17T21:36:06.000Z
- Author: Jonathan Creamer
- Tags: screencast

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...

```prettyprint
sudo vim /etc/hosts

```

Then use `i` for entering edit mode, move your cursor to where you want to edit. Enter the IP address and the hostname.

Then it's `escape` to exit insert mode, `wq` to save and quit.