Linux Process Management Commands and Description

Commands

Description

Example

ps

This command will show you the information about the programs that are currently running on your computer.

ps aux 

Shows all running processes

top

This command will lets you see how much of the computers resources (like CPU and memory) are being used and as well as the details about the running programs and processes.

top 

Displays real-time process information

kill

This command wil allow you to stop the running program by sending it a signal.

kill 1234 

Kills process with PID 1234

killall

This command will stops all the running programs that match a specific name that you will provide.

killall firefox 

Kills all Firefox processes

pkill

This command will let you search for the program and to stop a program based on its name or the other details.

pkill -9 httpd 

Forcefully kills the httpd process

pgrep

This command will help you find the program by name or with other attributes and gives you its process ID number.

pgrep chrome 

Shows PIDs of Chrome processes

nice

This command will sets the priority level of the program that making it more or less important compared to other programs.

nice -n 10 script.sh 

Runs script.sh at lower priority

renice

This command will change the priority level of the program that are already running.

renice -n 5 1234 

Changes priority of PID 1234 to 5

jobs

This command will show you the information about the programs that are running into your current shell session.

jobs 

Lists jobs in the current shell session

fg

This command will bring a program that are running in the background or into the foreground.

fg %1 

Brings job 1 to the foreground

bg

This command will send the program to run into the background.

bg %2 

Sends job 2 to the background

nohup

This command will run a program in the background and it will keep it running even after you close the shell session.

nohup script.sh & 

Runs script.sh in background persistently

screen

This command will create the virtual terminal session that you can detach and then reattach it to at any time.

screen 

Starts a new screen session

ps aux

This command will display a detailed list of all the running programs on the system including those started by the users.

ps aux 

Shows detailed process list

systemctl

This command will manage the system services and the processes into the your system.

systemctl 

status nginx Shows status of Nginx service

top -H

This command will show the real time system resource usage like CPU, memory, and the details about running programs in a hierarchical view.

top -H 

Displays processes in a tree view

pstree

This command will displays the system processes into a tree like structures.

pstree 

Shows process tree

lsof

This command will lists open the files and the programs that are using onto them.

lsof -i 

Lists open network file descriptors

Linux Process Management Command Cheat Sheet

On Linux computers there are special commands to control the programs that are running. These commands are called process management commands. With the help of process management commands you can look at the list of the programs that are currently running on your computer. You can also start new programs and run them and stop programs that are already running and make some programs more important than others.

Process management commands help you understand and manage the different programs running on your Linux computer. They allow you to see what’s happening and control the programs as needed.

Table of Content

  • What is Linux Process Management?
  • Linux Process Management Commands and Description
  • FAQs – Linux Process Management Command Cheat Sheet
    • What command shows the currently running programs?
    • What command stops a running program?
    • Can I make important programs run faster? How?
    • I closed the terminal but need that program still running. What can I do?
    • How can I see what programs are using up too many resources?
    • How to find a running program if I don’t know its full name?
    • How do I run one program in the background so I can use the terminal for something else?

Similar Reads

What is Linux Process Management?

Linux process management is the way to control and organize all the programs running on your computer. When you run a program on Linux it creates something called a “process”. Process management allows you to see the list of all the processes currently running on your system. It also lets you start the new processes which means running the new programs. If there is a process you no longer need you can stop it and remove that program from the system....

Linux Process Management Commands and Description

...

Conclusion

Linux provides many commands that allow you to easily manage and control the programs running onto your computer. With these commands you can see what programs are currently running, and start new ones, or stop unnecessary ones, and prioritize the important programs. Mastering these basic process management commands will give you the better understanding and control over the Linux systems operations....

FAQs – Linux Process Management Command Cheat Sheet

What command shows the currently running programs?...