Ubuntu Server editing file from command line
Solution 1
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.
Solution 2
Use nano instead of vi? nano functions like graphical text editors.
Related videos on Youtube
CT.
Updated on September 17, 2022Comments
-
CT. over 1 year
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
-
CT. over 14 yearsis this possible on a macbook keyboard which has no insert key?
-
John T over 14 yearspress i
-
Richie Marquez over 14 yearsI'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.
-
Joshua K over 14 yearsIt's the HELP key I believe.