1. ps -ef | grep redis
ps: show a process
-A shows all programs.
-e This parameter has the same effect as specifying the "A" parameter.
-f Display UID , PPIP, C and S TIME fields.
The grep command is to find
the middle | is the pipeline command means that the ps command and grep are executed at the same time
This command means to display the process related to redis
2. kill[parameter][process number]
kill -9 4394
kill is to send a signal to a process id. The signal sent by default is SIGTERM, and the signal sent by kill -9 is SIGKILL, which is exit. The exit signal will not be blocked by the system, so kill -9 can kill the process smoothly. Of course you can also use kill to send other signals to the process.