Common ubuntu command line
Software Update and Installation
Source update: sudo apt-get update
Software Update and update of installed packages: sudo apt-get upgrade
Software Installation: sudo apt-get install xxx (xxx is the software to be installed)
Permission
If you do not have sufficient permissions to modify files in the root directory or paste or delete files, sudo nautilus
Obtain the highest permission to open the software or other: su
Vim operations and file operations
To open a document under home: cd/home/zw/java/code
Then use: ls
Show all files and names
Vim operations
Continue: vim readme.txt
Are you sure you want to open the document and insert it by I?
After modification, Press Esc to exit,
: Q (Exit)
: Wq (save and quit)
After exiting
The above is only the basic insert, modify, and save operations for vim.
Vim operation 2
The following command lines are some basic command line operations of vim. If you need more operations, Baidu.
: Q exit
: Q! Force exit and do not save
: W save
: Wq save and exit
: Help I insert Command help (view)
: Set number or: set nu displays the row number
: Set nonumber or: set nonu does not display the row number
Vim + n filename: Enter row n of the file to modify
Vim filename: Enter the last line of the file
U undo the previous operation
/Hello search for the hello character
: S/hello/world: Replace the hello character with world (only in the row where the cursor is located)