Linux termination process and view process tree

Syntax
kill [options] process number
killall process name

查看是否有sshd进程
ps -aux | grep sshd
查看获得进程号
kill 4010

View the process tree pstree
syntax: pstree [options], you can see the process information more intuitively
-p: display the PID of the process
-u: display the user of the process

Please show the pid of the process in
pstree -p
the form of a tree
id pstree -u

Terminate multiple gedit editors [killall, terminate process by process name]
killall gedit

Force kill a terminal with -9
kill -9 4090

Published 48 original articles · Likes0 · Visits 282

Guess you like

Origin blog.csdn.net/qq_44971387/article/details/105361584