| Command | Description | Syntax/Example | Platform Notes |
| ps | Displays information about running processes. | ps aux | All Platforms |
| top | Interactive real-time tool to display process information. | top | All Platforms |
| htop | Extended version of top with improved user interface. | htop | Possibly reinstall |
| pstree | Displays processes in a tree-like structure. | pstree | All Platforms |
| kill | Sends signals to processes, usually to terminate. | kill -9 PID | All Platforms |
| killall | Terminates processes by name. | killall name | All Platforms |
| pkill | Terminates processes based on a pattern matching of their name. | pkill -f pattern | All Platforms |
| pgrep | Searches for processes based on pattern matching and outputs the PIDs. | pgrep -l name | All Platforms |
| nice | Starts a new process with adjusted priority. | nice -n 10 command | All Platforms |
| Renice | Changes the priority of a running process. | renice -n 5 -p PID | All Platforms |
| nohup | Executes a command that does not stop when you log off. | nohup command & | All Platforms |
| BG | Continues to run a paused process in the background. | bg %Job number | All Platforms |
| fg | Brings a background process to the fore. | fg %Job number | All Platforms |
| Jobs | Lists current jobs in the shell. | Jobs | All Platforms |
| lsof | Lists open files and associated processes. | lsof -p PID | All Platforms |
| strace | Tracks system calls to a troubleshooting process. | strace -p PID | All Platforms |
| systemctl | Management of systemd services and units. | systemctl status | Systems with Systemd (Ubuntu, RHEL 7+, CentOS 7+) |
| Service | Starts, stops, or checks services (older command). | Service Name Status | Systems with SysVinit (older systems) |
| init | Changes the runlevel of the system or performs a reboot/shutdown. | init 0 | Systems with SysVinit |
| chrt | Changes the scheduling priority of a process. | chrt -p 0 PID | All Platforms |
| Timeout | Executes a command for a specified amount of time. | Timeout 5s command | All Platforms |
| pmap | Displays the memory allocation of a process. | pmap PID | All Platforms |
| vmstat | Displays system performance and memory usage. | VMSTAT 1 | All Platforms |
| IOSTAT | Displays CPU and I/O statistics. | IOSTAT | All Platforms |
| sar | System Activity Reporter, collects and reports system activity data. | sar -u 1 3 | Possibly reinstall (sysstat package) |
| pidof | Returns the PID of a running process by its name. | pidof process-name | All Platforms |
| watch | Periodically executes a command and displays the result. | watch command | All Platforms |
Platform Notes:
- All platforms: These commands are available on most Linux distributions.
- Possibly reinstall: Some commands like htop or sar are not installed by default and need to be added via the package manager.
- Ubuntu/Debian: Installation with sudo apt install htop.
- RHEL/CentOS: Install with sudo yum install htop.
- Systems with Systemd: Newer distributions such as Ubuntu (from 15.04), RHEL/CentOS (from version 7) use Systemd.
- Systems with SysVinit: Older systems use init scripts and the service command.
Explanations of selected commands:
- ps: With ps aux, all processes of all users are displayed. Option a for all users, u for detailed format, x for processes without a controlling terminal.
- Top and HTOP:
- top: Displays running processes in real time, sorted by CPU utilization.
- htop: Provides a colorful, interactive interface with mouse support and additional features such as scrolling and sorting.
- kill, killall, pkill:
- kill: Terminates a process based on its PID.
- killall: Kills all processes with a specific name.
- pkill: Terminates processes based on pattern matching.
- nice and renice:
- nice: Starts a process with a changed priority (niceness value from -20 to 19).
- renice: Changes the priority of a running process.
- Jobs, BG, FG:
- jobs: Lists all running or suspended jobs in the current shell.
- bg: Resumes a paused job in the background.
- fg: Brings a background job to the foreground.
- LSOF:
- Useful for identifying processes accessing specific files or ports.
- Example: lsof -i :80 shows processes that use port 80.
- strace:
- Helps troubleshoot by logging system calls and signals of a process.
- Can be used to understand why a process crashes or hangs.
- Systemctl:
- Central command to manage services under systemd.
- Examples:
- systemctl start service-name: Starts a service.
- systemctl stop service-name: Stops a service.
- systemctl enable service-name: Enables automatic startup at boot.
- systemctl disable service-name: Disables automatic startup.
- Service:
- Used on older systems or those without systemd.
- Example: service ssh status checks the status of the SSH service.
- chrt:
- Can change the scheduling policy and priority of a process.
- Example: chrt -f -p 99 PID sets a process to real-time priority.
- Timeout:
- Terminates a process after a set amount of time.
- Useful for preventing processes from running for too long.
- PMAP:
- Displays detailed information about a process’s memory usage.
- Helpful in analyzing memory leaks.
- VMSTAT and IOSTAT:
- vmstat: Shows statistics on virtual memory, CPU, and system processes.
- iostat: Monitors system I/O devices and outputs CPU statistics.
- SAR:
- Part of the sysstat package.
- Collects historical data about system activity.
- Can be used to analyze performance issues over a longer period of time.
Example of installing missing commands:
- Ubuntu/Debian:
- sudo apt update
- sudo apt install htop sysstat
- RHEL/CentOS:
- sudo yum update
- sudo yum install htop sysstat
Tips:
- Understand process priorities: Lower niceness scores mean higher priority. By default, processes have a niceness value of 0.
- Send signals with kill:
- kill -SIGTERM PID or kill -15 PID: Ends a process in a friendly way.
- kill -SIGKILL PID or kill -9 PID: Kills a process immediately.
- Identify suspended processes:
- A process can be stopped with Ctrl+Z.
- With jobs you can see the paused process and resume it with bg or fg.

