1.sudo-i (no password,new user), Su-(password)
2.xdg-open (Open file)
3.putty (scroll)
4.tar zxvf filename.tar.gz (release)
Tar zcvf filename.tar.gz (TAR)
Tar xvf filename.tar (release)
Tar cvf Filename.tar (TAR)
Gunzip filename.gz (release)
gzip-d filename.gz (release)
Gzip filename.tar.gz and. tgz (Zip)
5.share file between Linux (VM) and Windows:
Method 1: (Create a shared file on win)
(1). Install Virtual tools in VM
(2). Copy vmwaretools-9.9.0-2304977.tar/mnt/cdrom/
(3). Tar zxvf vmwaretools-9.9.0-2304977.tar.gz
(4). Find vmware-install.pl execute "./vmware-install.pl"
(5). Setting-options-change to use in VM
(6). Create a file in Windows and add path in Setting-options
(7). Finally,/mnt/hgfs in Linux
Method 2: (Create a shared file on Linux)
(1). Create a file on Linux, set sharing properties
(2). Follow the prompts to install Samba
(3). sudo smbpasswd-a xxx
(4). Open the shared file on the network on Windows, enter this username xxx and password
6.vim and Shell switching:
Method One: Cltr+z hangs vim (or: suspend), FG command back to VIM
Method Two: Vim internal execution: ls!, view return shell results, enter return VIM
Method Three: Start a new shell, command: Shell
7. Reset the VIM session
Create session File:: Mksession Vimbook.vim
Restore session;: Source Vimbook.vim
Shell starts and restores vim:vim-s (source) Vimbook.vim
What to restore depends on sessionoptions,
Default value: Blank (keep empty window),
Buffers (all buffers, not within a window)
CurDir (current directory)
Folds (collapsed, including manually created)
Help (Assistance window)
Options (all choices and mappings)
Winisze (Window size)
In addition, you can restore the Vim window size:: Set sessionoptions+=resize
8. Clear History Command: history-c
Execution History Command:! (number)
9. Open Terminal ctrl+alt+t
Close Terminal Shift+ctrl+q
New Window (new folder on desktop) shift+ctrl+n
10. New tab page Shift+ctrl+t
Close the tab page shift+ctrl+w
Previous Tab Ctrl+pgup
Next tab CTRL+PGDN
Label page Shift left Shift+ctrl+pgup
tab Right Shift SHIFT+CTRL+PGDN
Toggle Tab ALT + (number)
11. Copy Shift+ctrl+c
Paste Shift+ctrl+v
12. Terminal change Size: F11 fullscreen
CTRL + Plus font magnification
Ctrl + Minus font decrease
CTRL + 0 Font restore
13. Open Search Win+q
Toggle Window Win+w
Close Window Ctrl+w
14. Compile and debug:
Gcc-o qsort qsort.c Generate executable target file qsort
File qsort to view files of type
GDB qsort Debug Target file
Run execution target file
Q Exit GDB
15.vim shortcut keys:
K On
J Down
H Left
L Right
Ctrl+o back at the last jump.
Ctrl+i jumps back to the next
: Ju shows all the places that can jump
Uundo (Revocation)
(Undo is a tree structure: Undo 2undo to the 2nd layer of the structure: Undolist:earlier 10s undo to the first 10 seconds)
Ctrl+rredo
: q! Forced exit
: E filename Opens a file
: SaveAs filename saved as, named filename
A after the cursor is inserted
I insert before the cursor
A at end of line insertion
o Insert a row under the cursor
o Insert a line on the cursor
(n) x Delete the (n) object after the cursor
DD Delete a row
3DW Delete 3 words
J will mention the next line to the front
R Replacement Character
R replaces multiple characters
C (s) (d) Enter input mode after deletion
s enters input mode after deleting a row
~ Change Letter Case
Y copy
YY copy when moving forward
(small) p paste after current cursor
Big P Paste on current cursor
REG Displays the contents of all registers
ve continuous selection
Linux Usage Summary