cd
ls
pwd: display the full path of your current directory
".." : access the directory just above your current directory
"~" : access your home directory
"vi filename.txt"
"emacs filename.txt":
To use Vim, type "vi filename.txt", where "vi" is the command to open the Vim text editor and "filename.txt" is the name of the file you want to edit. To use Emacs, type "emacs filename.txt". If the file exists, the text editor will open with the file. Otherwise, the text editor will open a blank file with the name you chose.
Save and quit. When you're finished editing your text file, press Escape to enter Command mode. To save your changes, type ":w" (for "write"). To quit Vim and return to the Terminal, type ":q". To save and quit in one command, type ":wq". To quit without saving your changes, type ":q!".
Open your text file in Emacs. Type "emacs filename.txt" to do so. On some operating systems, Emacs will open in a separate window, leaving you with your Terminal window still accessible. You should see your text file in the main part of the window, with two lines at the bottom that show the status of your operations in Emacs.
网友评论