Pages

Friday 7 August 2009

VIM on the Mac OSX Terminal

I've been playing with hostfiles on my MacBook Pro this morning.

He's how I did it...

1. Search for Terminal in Spotlight;

2. Run >cd /etc

3. >sudo vi hosts

4. To enter edit mode, hit "esc" then i.

5. Do what you need to do;

6. Hit "esc"

7. Hit : , w , q . This saves and closes the file.

8. Quit Terminal

2 comments:

  1. Quicker way!
    1. Search for Terminal in Spotlight;

    2. >sudo vi /etc/hosts

    3. To enter edit mode, hit i. (no need for esc)

    4. Do what you need to do;

    5. Hit "esc"

    6. Hit :wq . This saves and closes the file.

    7. Quit Terminal

    ReplyDelete