Linux main process management

1. Check the process

You can view process information in the Linux system through the ps command

ps [-e -f]

Option: -e, displays all processes
Option: -f, displays information in a fully formatted form (displays all information) 
Generally speaking, the fixed usage is: ps -ef lists all information of all processes 

ps -ef 

2. To view the specified process,
 we can use the pipe character with grep to filter, such as:

Accurately find redis command information

 ps -ef | grep redis

Filter process information with the 6379 keyword (generally refers to filtering the 6379 process number) 

 ps -ef | grep 6379


3. Close the process
In Linux, you can close the process through the kill command.

kill [-9] process id

Option: -9 means forcefully shutting down the process. Not using this option will send a signal to the process asking it to shut down, but whether to shut down depends on the process's own processing mechanism. 

Guess you like

Origin blog.csdn.net/st75033562/article/details/133376687