Home Download Ubuntu

How to kill a process in Ubuntu server

Not having a graphical user interface, ubuntu server is kind of hard to work with if your new. Many of us start some processes and they don't know how to stop them. A little help is to work with htop, but i prefer the old cli. it's much faster and cleaner.
To see all the current processes you need to use the ps command. ps displays information about a selection of the active processes.

to see all the processes:

ps -A

it will display it's PID (it's process id), TTY (with console has started this process), TIME (cumulative CPU time) and CMD (the command). for all the information about it:

man ps

to search for a specific process and a detailed view:

ps aux | grep transmission

where transmission is the process we are searching for. the second column will display the PID for our process.

to kill it (send a signal to a process):

sudo kill -9 8785

where 8785 is the PID we searched for.
for more information about kill command:

man kill


Jorik said...

Thanks for the info! Just what I needed. I'm running ubuntu server for about 3 days now on my home server, so I'm new to this :<

I did get kinda stuck on the manual screen tho ;__; but managed to get out, with what I think it was, control + x.

Speedy Gonzales said...

Usually the exit combination keys are CTRL+X, CTRL+C or CTRL+Z. Each program has different combination keys.

Post a Comment