<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
%Y,%y year
%m month
%d day
%H Time
%M branch
%S second
<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 :

option meaning
-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 :

Key meaning
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

command

meaning

reboot

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

init 0

Shut down

init 6

restart

<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 .

option meaning
-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

option meaning
-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

Technology
©2019-2020 Toolsou All rights reserved,
Message quality platform series | Full link troubleshooting What is? FPGA? New York Youth Project “ Recapture Wall Street ”: Safeguarding the interests of retail investors Redis Queue implementation java Second kill system , No script , It can be used in production Don't annoy the panda with any cat !「 Kung Fu Panda 」20 It's the year of man 4 blood cartoon | CPU Warfare 40 year , The real king finally appeared !JS How to operate 20 Review strategy for senior students with high marks !!! Big data tells you , How tired are Chinese women MySQL An interview is a must !