How do I stop a process under Ubuntu Linux using command line and GUI tools?
You can use the following tools to stop a process under Ubuntu Linux:
- System Monitor application - A gui tools displays current active processes. it also provides detailed information about individual processes, and enables you to control active processes i.e. kill or end process.
- kill command - Send signal to a process such as kill or end a process.
- pkill command - Find processes or processes based on name and send end or kill singles to processes.
- killall command - Kill processes (including all its children) by name.
Gnome: System Monitor Application To Kill a Process
To start System Monitor GUI, click on System menu > Select Administration > System Monitor. Alternatively, open a command-line terminal (select Applications > Accessories > Terminal), and then type:
Click on Processes Tab:
How Do I End a Process?
- First select the process that you want to end.
- Click on the End Process button. You will get a confirmation alert. Click on "End Process" button to confirm that you want to kill the process.
- This is the simplest way way to stop (end) a process.
kill Command Line Option
You can use the kill command to send a signal to each process specified by a process identifier (PID). The default signal is SIGTERM (15). See the list of common UNIX / Linux signal names and numbers for more information. In this example, ps command is used to find out all running processes in the system:
$ ps aux | grep firefox
To end a process, enter:
$ kill -s 15 PID-HERE
$ kill -s 15 2358
OR send signal 9 (SIGKILL) which is used for forced termination to PID # 3553:
$ kill -9 PID-HERE
$ kill -9 3553
See our previous FAQ "how to kill a process in Linux" for more information.
pkill Command Line Option
The pkill command allows you to kill process by its name, user name, group name, terminal, UID, EUID, and GID. In this example, kill firefox process using pkill command for user vivek as follows:
$ pkill -9 -u vivek firefox
killall Command Line Option
The killall command sends a signal to all processes. To terminate all httpd process (child and parent), enter:
$ sudo killall -9 httpd
$ sudo killall -9 apache2
See sending signal to Processes wiki article for more information.
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop