Linux commands: Difference between revisions
Jump to navigation
Jump to search
m
→Show the process list & kill the process
| Line 274: | Line 274: | ||
* {{kbd | key=kill -9 <PID>}}. Force to kill the process with PID number: 101, enter {{kbd | key=kill -9 101}}. <ref>[http://linux.vbird.org/linux_basic/0440processcontrol.php#killjobs 鳥哥的 Linux 私房菜 -- 第十六章、程序管理與 SELinux 初探]</ref> | * {{kbd | key=kill -9 <PID>}}. Force to kill the process with PID number: 101, enter {{kbd | key=kill -9 101}}. <ref>[http://linux.vbird.org/linux_basic/0440processcontrol.php#killjobs 鳥哥的 Linux 私房菜 -- 第十六章、程序管理與 SELinux 初探]</ref> | ||
Kill the process by process name | Kill the process by process name<ref>[https://stackoverflow.com/questions/3510673/find-and-kill-a-process-in-one-line-using-bash-and-regex Find and kill a process in one line using bash and regex - Stack Overflow]</ref> | ||
* {{kbd | key=<nowiki>sudo kill $(ps aux | grep '名稱' | awk '{print $2}')</nowiki>}} | * {{kbd | key=<nowiki>sudo kill $(ps aux | grep '名稱' | awk '{print $2}')</nowiki>}} | ||