Let's start with a very useful command: history looks at the historical commands on the Linux machine.
View memory under Linux We generally use the free command: free-m
View hard disk Status: Df-h
View CPU Information: Less/proc/cpuinfo View CPU Cores: Less/proc/cpuinfo |grep ' model name '-C your Linux host character set (LANG): env | grep LANG
View Process: Ps–ef | grep MySQL
Kill process: Kill-9 port number
viewing ports: Netstat-ano | grep 3306
View folder size, and sort: Du-sh * | Sort-n
Effective after a firewall restart
Open: Chkconfig iptables on
OFF: Chkconfig iptables off
Firewall is in immediate effect and fails after reboot
Open: Service iptables start
Close: Service iptables stop
Create folder: mkdir log
Create file: Touchlog
Removal directory: Rm-rf/usr/lib64/mysql
Remove RM Log from File
Copying files: cp/mu/mu1
Copy directory: Cp-r one
Switch directory: CD
View file contents: Cat
Vim three modes: Command mode, insert mode, edit mode. Use ESC or I or: to toggle the mode.
: Q exit
: q! Force exit
: Wq Save and exit
Query Find/-name mysqlfind/-iname "*.CNF"-print Display Date: Date
LS Display file or directory
-l list File details L (list)
-a lists all files and directories under the current directory, including Hidden A (all)
Output Tomcat Run log
Tail-f/tomcat/logs/cataline.out
Xshell
SZ filename Download file
Linux Common commands Summary--keep adding