0% found this document useful (0 votes)
35 views10 pages

Processes and Job Control

This document discusses how to view and control processes running on a Linux system. It describes how to use the ps command to list running processes and get process information. It also explains how to launch processes in the background and foreground, suspend and resume processes, and kill processes by job number, process ID (PID), or signal.

Uploaded by

muthu s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views10 pages

Processes and Job Control

This document discusses how to view and control processes running on a Linux system. It describes how to use the ps command to list running processes and get process information. It also explains how to launch processes in the background and foreground, suspend and resume processes, and kill processes by job number, process ID (PID), or signal.

Uploaded by

muthu s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Processes and Job Control

What You Will Learn


● List running processes.
● Foreground vs background processes.
● Launch background processes.
● Kill processes.
Listing Processes and Information
ps Display process status.
ps Options
-e Everything, all processes.
-f Full format listing.
-u username Display username’s processes.
-p pid Display information for PID.
Common ps Commands
ps -e Display all processes.
ps -ef Display all processes, full.
ps -eH Display a process tree.
ps -e --forest Display a process tree.
ps -u username Display user’s processes.
Other ways to view processes
pstree Display processes in a tree format.
top Interactive process viewer.
htop Interactive process viewer.
Background and Foreground Processes
command & Start command in background.
Ctrl-c Kill the foreground process.
Ctrl-z Suspend the foreground process.
Background and Foreground Processes
bg [%num] Background a suspended
process.
fg [%num] Foreground a background
process.
kill Kill a process by job number
or PID.
jobs [%num] List jobs.
Killing Processes
Ctrl-c Kills the foreground proc.
kill [-sig] pid Send a signal to a process.
kill -l Display a list of signals.

kill 123
kill -15 123
kill -TERM 123 kill -9 123
Summary
● ps
● Ctrl-c
● Ctrl-Z
● bg
● fg
● jobs
● kill

You might also like