1. ps 命令 当前控制台运行的进程
ps -aux 查看所有进程,包括后台进程,只显示自己的进程号(PID)
ps -ef 查询系统中所有运行的进程,包括后台进程,而且可以显示每个进程的父进程号(PPID)
ps aux|grep tomact 解释:以管道形式搜索
pstree 以树状的形式显示进程,查不到进程号
pstree -p 以树状形式显示进程,并显示进程号
2. kill 命令 结束进程 ------------与之对应的是开启进程: service 进程 start
kill 进程号 注:一些守护进程是无法杀死的
kill -9 进程号 解释:强制杀死进程