Process Management Commands in Linux (original) (raw)

Last Updated : 22 Dec, 2025

Process management commands in Linux are used to monitor, control, and manage running processes on the system. These commands help users and administrators view active processes, control execution, analyze performance, and troubleshoot system behavior efficiently.

process_management_commands

The following commands are used for process management in Linux.

1. accton

The accton command is used to enable or disable process accounting. It records information about processes executed on the system.

**Syntax:

accton file_name

**Example:

accton on

Output

2. bg

The bg command is used to resume a stopped job in the background. It allows processes to continue running without blocking the terminal.

**Syntax:

bg job_id

**Example:

bg %1

3. chrt

The chrt command is used to set or view real-time scheduling attributes of a process. It controls process priority.

**Syntax:

chrt [options] command

**Example:

To see the current scheduling policy:

$ pidof -s firefox

To see the current scheduling policy

Now to retrieve the current scheduling policy and priority for the firefox process, use chrt in the following way:

$ chrt -p 5794

To see the current scheduling policy

4. fg

The fg command brings a background job to the foreground. It allows interaction with the running process.

**Syntax:

fg job_id

**Example:

sleep 60 &
fg %3

Lightbox

5. kill

The kill command is used to send signals to processes. It is commonly used to terminate unresponsive processes.

**Syntax:

kill signal pid

**Example:

top
kill 1234

6. mpstat

The mpstat command displays CPU usage statistics for processors. It helps monitor system performance.

**Syntax:

mpstat

**Example:

mpstat

Basic Example

7. pidof

The pidof command displays the process ID of a running program. It helps locate processes quickly.

**Syntax:

pidof process_name

**Example:

pidof bash

pidof-bash

8. pmap

The pmap command displays the memory usage of a process. It helps analyze memory consumption.

**Syntax:

pmap pid

**Example:

pmap 9123

Basic Example of pmap command

9. ps

The ps command displays information about running processes. It shows process ID, status, and resource usage.

**Syntax:

ps

Example:

ps aux

file

10. top

The top command provides a real-time view of running processes. It shows CPU and memory usage dynamically.

**Syntax:

top

**Example:

top

top

11. htop

The htop command is an enhanced version of top. It provides a more user-friendly and interactive interface.

**Syntax:

htop

**Example:

htop

file

12. strace

The strace command traces system calls made by a process. It is useful for debugging applications.

**Syntax:

strace command

**Example:

strace ls

13. time

The time command measures how long a command takes to execute. It displays execution time and resource usage.

**Syntax:

time [options] command [arguments]

**Example:

time -p sleep 3

14. watch

The watch command runs a command repeatedly at fixed intervals. It is useful for monitoring changes.

**Syntax:

watch [options] command

**Example:

watch -d free -m

15. vmstat

The vmstat command displays memory, CPU, and I/O statistics. It provides an overview of system performance.

**Syntax:

vmstat

**Example:

vmstat

file

16. uptime

The uptime command displays how long the system has been running. It also shows system load averages.

**Syntax:

uptime

**Example:

uptime

file

17. w

The w command displays information about logged-in users and their running processes. It combines user and process details.

**Syntax:

w

**Example:

w