Most popular text editors: Vi and Nano
The default editor that comes with the UNIX operating system is called vi.
Two modes:
In the command mode, every character typed is a command that does something to the text file being edited.
In the insert mode, every character typed is added to the text in the file. Pressing <Esc>
turns off the insert mode.
Edit file readme.txt:
$ vi readme.txt
Recover file readme.txt (that was being edited when system crashed):
$ vi -r readme.txt
There are several ways to quit vi:
:x quit vi, writing out modified file to file named in original invocation
:wq -> quit vi, writing out modified file to file named in original invocation
:q -> quit (or exit) vi
:q! -> quit vi even though latest changes have not been saved for this vi call
More: http://www.cs.colostate.edu/helpdocs/vi.html
Edit file readme.txt:
nano readme.txt