How can I see background process in Ubuntu? And kill unnecessary processes?

From the terminal, ps -ef will list all the processes. See man ps. See man kill, man 2 kill, man killall, man nice, man pkill, man renice, man 7 signal, and man skill to mess with processes. However, simply killing a process that you think is useless may be a mistake. The system might restart the process, or something you depend on might depend on the process you killed. Learn what the processes do, and look at /etc/init/ and /etc/init.d, /etc/rc?.d, man service to see how processes are started by the system.


Using GUI, you can use System Monitor

enter image description here

Or from terminal you can use

ps aux | less

To view every process:

ps -A or ps -e

All processes running by a user:

ps -u username

To kill a process, either find the process name and type:

kill -9 processname

or kill the process ID (PID):

kill pid

Stop/suspend a process:

ctrl-z

Source:Man Page


There is also the tool "htop". It is like "top", but has lots of other capabilities.

In a terminal enter:

sudo apt install htop