Linux Process Management Commands

The following are the process management commands in Linux:

Linux ps Command

This command show all running (working) processes.

Syntax

ih@linux:~$ ps

ps Command Options

The following are the options used with the ps command in Linux:

1. ps -e

This command is used to show all processes with PID, TTY, TIME, CMD.

ih@linux:~$ ps -e

2. ps -a

This command is used to show all processes with PID, TTY, TIME, STAT, CMD.

ih@linux:~$ ps -a

3. ps -A

This command is used to show all processes.

ih@linux:~$  ps -A

4. ps -C

This command is used to show all processes sorted by command name.

ih@linux:~$ ps -C

5. ps -g

This command is used to show all processes by read group ID.

ih@linux:~$ ps -g

6. ps -u

This command is used to show all processes by read user ID.

ih@linux:~$ ps -u

7. ps -p

This command is used to show all processes by process ID.

ih@linux:~$ ps -p

8. ps -x

This command is used to show all processes without controlling ttys.

ih@linux:~$ ps -x

9. ps -ax

This command is used to show all processes without controlling ttys.

ih@linux:~$ ps -ax

Linux top Command

This command is used to display all linux tasks.

Syntax

ih@linux:~$ top

Linux kill Command

The kill command is used to kill the running processes in Linux.

kill Command Options

1. kill PID

This command kills the process of given PID.

ih@linux:~$ kill 123
**** process will be killed of PID 123 ****

2. killall proc

This command kills all the processes names "proc".

ih@linux:~$ killall linux
**** process will be killed all processes names "linux" ****

Linux bg Command

This command shows the list of all the background processes.

Syntax

ih@linux:~$ bg

Linux fg Command

This command brings the most recent process to foreground.

Syntax

ih@linux:~$ fg

fg n

This command brings the process n to the foreground.

ih@linux:~$ fg -n

Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.