http://wenku.baidu.com/view/eab9dd84b9d528ea81c779f7.html linux Common commands 1, sudo vim/etc/ hosts Edit Hosts file contents 2, cat/etc/hosts View files 3, ll/ls View current directory contents ls-l& nbsp You can display details of directory contents 4, ifconfig View network conditions 5, ping Test network Connectivity 6, ctrl+c Force exit 7, cd Switch directory CD. Access to the previous directory cd- access to the previous entry directory cd~ access to the user's home directory 8, hostname display hostname 9, reboot Restart 10, su root switch User 11, pwd to display the user's current directory 12, rm-f filename Delete file 13, sudo rz upload file 14, mkdir FileName Create file 15, touch test/a.txt Add file to file 12, VIM uses vim three modes: Command mode, insert mode, edit mode. Use ESC or I or: to toggle the mode. Command mode: :q Exit :q! Mandatory exit :wq &NBSP ; Save and exit :set number   show line number :set nonumber Hide line number /apache Find Apache in the document press N to jump to the next, shift +n previous yyp copy cursor line and paste h (one character left ←), J (next line ↓), K (previous line ↑), L (move right one character →) 13, file Rights Management Three basic permissions R Read Numeric representation 4 w write value as 2 x   ; executable numeric representation for 1 14, change permissions sudo chmod [u-owned user G-owned group o other users a all users] [+ Add permissions -Reduce permissions] [r w x] directory name For example: there is a file filename, the permission is "-rw-r----x", change the permission value to "- Rwxrw-r-x ", represented as 765 sudo chmod u+x g+w o+r filename Above example can be represented by a numeric value sudo chmod 765 filename
Linux Common commands