<1> View current calendar ：cal
View current calendar ,-y Show full year calendar ：
<2> Display or set time ：date
extend , Display time format （date '+%y,%m,%d,%H,%M,%S'）：
format format meaning
<3> View process information ：ps
Process is a program with some independent functions , It is the basic unit of operating system dynamic execution .
ps Command to view the detailed status of a process , Common options ( Options are optional “-”) as follows ：
-a Display all processes on the terminal , Include other users' processes
-u Show detailed status of the process
-x Display the process without control terminal
-w Show widening , To show more information
-r Show only running processes
In the actual work , Often used, we need to view a certain service process
ps -ef|grep service name
<4> Dynamic display process ：top
Dynamic display of running processes .
top Command can be run after , Update display information at specified intervals .
Can be used in top Add on command -d To specify the time interval between display information updates .
stay top After command execution , You can press the key to sort the displayed results ：
M Sort by memory usage
P according to CPU Rank by occupancy
T Sort according to the running time of the process
U You can filter the process based on the user name entered later
K According to the following input PID To kill the process .
q sign out
h Get help
<5> Terminate process ：kil
grammar ：kill [-signal] pid
Step 1 Find the corresponding pid, copy
Step 2 kill Process number
<6> Shutdown and restart ：reboot,shutdown,init
Restart the operating system
shutdown –r now
Restart the operating system ,shutdown Prompt other users
shutdown -h now
Shut down now , among now Equivalent to time 0 Status of
shutdown -h 20:25
Today's 20:25 Will shut down
shutdown -h +10
The system will shut down automatically in ten minutes
<7> Detect disk space ：df
Check the disk space occupation and vacancy of the file system , Can display all file system usage of nodes and disk blocks .
-a Display disk usage for all file systems
-m with 1024 Display in bytes
-t Displays the disk space usage of each specified file system
-T Show file system
<8> Check the disk space occupied by the directory ：du
Used to count the amount of disk space occupied by a directory or file , The execution result of this command is consistent with df similar ,du More focus on disk usage .
du The format of the command is as follows ： du [ option ] Directory or filename
-a Recursively display the data block occupied by files and subdirectories in the specified directory
-s Display the data block occupied by the specified file or directory coordination h use -h Indicated by KB, MB, GB, TB Format for humanized display
-b Display disk usage in bytes
-l Calculate all file sizes , Calculate hard linked files multiple times
du -sh * ： Represents a total of KB, MB, GB, TB All directories occupying disk space
<9> View or configure network card information ：ifconfig
<10> Test remote host connectivity ：ping
ping Domain name and ip Address is OK