Ubuntu 10.04 Lucid Lynx is, overall, pretty stable. But nothing is perfect, and sometimes processes crash, hang, or lock up. Fortunately, it’s quite simple to use the Terminal command line to force processes to quit or restart.
Let’s say, for example, that gedit had frozen up. To kill the gedit process, you’d first need to know its PID, its Process ID Number. Every application and daemon on a Linux system receives a PID. To find gedit’s PID, use this command at the Terminal prompt:
ps -u USERNAME
(Replace USERNAME with your username, obviously.)
This will spit out a list of all the processes associated with your username running on the Ubuntu system. Find the “gedit” process and note its PID.
Once you have gedit’s PID, you can use the kill command to kill the process. (For the sake of the example, let’s say gedit has a PID of 1456):
This will force the gedit process to quit. If it doesn’t, try kill with the -9 switch:
kill -9 1456
This forces the gedit process to quit without giving it a chance to release its claimed system resources. To get the RAM gedit had claimed back, you might have to restart your Ubuntu system.