Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

First attempts at a linux distro. Trying to run JeOS as a virtual machine on my mac with vmware fusion. Installed ubuntu server 9.04 minimal virtual machine. Installed ssh. Installed VMwareTools.

Now I am trying to change permissions to a shared folder from my mac. I type in this command "sudo vi /etc/fstab" into terminal while ssh into my virtual machine. How do I edit whatever sort of text file it brings up from the command line. My up and down arrows just end up putting random letters in and I can't input where I want.

Basically trying to follow this guide: http://intranation.com/entries/2009/03/development-virtual-machines-os-x-using-vmware-and/

And I am at the very last steps where it tries to get read write permissions to the shared Projects folder.

Thanks

share|improve this question

3 Answers 3

up vote 5 down vote accepted

Press:

  • k to move the cursor up
  • j to move the cursor down
  • h to move the cursor left
  • l to move the cursor right
  • i to insert text
  • Esc to be able to navigate and use other commands
  • :w to save
  • :q to quit
  • ZZ or :wq to save and quit.
share|improve this answer
    
great - thank you –  CT. Sep 21 '09 at 2:58
2  
I'm not familiar with Ubuntu JeOS, but if it is available, you might also want to try typing 'vimtutor' at the command line for a more in-depth explanation of how to use vim/vi. –  Richard Marquez Sep 21 '09 at 3:04

Use nano instead of vi? nano functions like graphical text editors.

share|improve this answer

Press the Insert button on your keyboard. That will allow you to navigate the file with the up/down arrow keys and type letters like normal. You can save and exit by pressing Escape then :x then Enter. Should be all you need.

share|improve this answer
    
is this possible on a macbook keyboard which has no insert key? –  CT. Sep 21 '09 at 2:35
    
press i –  John T Sep 21 '09 at 2:45
    
It's the HELP key I believe. –  Joshua Kersey Sep 24 '09 at 2:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.