Open In App

Linux Process Management Command Cheat Sheet

Last Updated : 25 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

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 programs that are currently running on your computer. You can also start new programs and run them, 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.

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.

Additionally, the process management gives you the ability to decide which processes are most important. You can make some processes a higher priority so they run better than other processes. Overall process management helps you keep track of what is running on your Linux computer and have control over those running programs.

States of a Process In Linux

In Linux, the process goes through several states during its lifetime. The stages of a process in Linux are as follows:

1. Created: A process is created when a program is executed.

2. Ready: The process enters the "ready" state when it is waiting to be assigned to a processor by the Linux scheduler.

3. Running: The process enters the "running" state when it is assigned to a processor and is actively executing its instructions.

4. Waiting: The process enters the "waiting" state when it is waiting for some event to occur, such as input/output completion, a signal, or a timer.

5. Zombie: A process enters the "zombie" state when it has completed its execution but its parent process has not yet read its exit status.

6. Stopped: The process enters the "paused" when is has passed usually by a command user.

7. Terminated: The process enters the "terminated" state when it has completed its execution or has been terminated by a signal.

Process-State-in-Linux

Linux Process Management Commands and Description

Here are some basic commands used to manage process in Linux.

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

pidof

This command is used to get the Process ID (PID) of a running process.

pidof <process>

Get the PID of a running process.

pgrep

This command used to search process by name and return their Process ID (PID).

pgrep <name>

Search PID by name

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

htop

This command use to shoe the processes in Interactive process viewer and more friendly than top command.

htop

Interactrive Process Viewer

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

xargs kill

This command will kill multiple processes by using piped input.

pstree

kill by using piped input

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

taskset

This command help to set or get CPU affinity for a process.

taskset -c [PID]

Set CPU affinity for process

schedtool

This is the advanced tune scheduling tool used for scheduling policies and CPU affinity.

schedtool

Tune advanced scheduling policies and CPU affinity.

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 -p [PID]

Lists open network file descriptors

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.


Article Tags :

Similar Reads