Home » Linux

Linux Terminal Commands - Process management commands (ps,kill)

Working with ps,kill command (Process management commands)

command description
ps This command show all running (working) processes.
                                  
[email protected]:~$ ps

ps   -e This command is used to show all processes with PID, TTY, TIME, CMD.
          
[email protected]:~$ ps -e

ps   -a This command is used to show all processes with PID, TTY, TIME, STAT, CMD.
                                  
[email protected]:~$ ps -A

ps   -A This command is used to show all processes.
                                  
[email protected]:~$  ps -A

ps   -C This command is used to show all processes sorted by command name.
                                  
[email protected]:~$ ps -C

ps   -g This command is used to show all processes by read group ID.
                                  
[email protected]:~$ ps -g

ps   -u This command is used to show all processes by read user ID.
                                  
[email protected]:~$ ps -u

ps   -p This command is used to show all processes by process ID.
                                  
[email protected]:~$ ps -p

ps   -x This command is used to show all processes without controlling ttys.
                                  
[email protected]:~$ ps -x

ps   -ax This command is used to show all processes without controlling ttys.
                                  
[email protected]:~$ ps -ax

top This command is used to display all linux tasks.
                                  
[email protected]:~$ top

kill   PID This command kills the process of given PID.
                                  
[email protected]:~$ kill 123
**** process will be killed of PID 123 ****
killall   proc This command kills all the processes names "proc".
                                  
[email protected]:~$ killall linux
**** process will be killed all processes names "linux" ****
bg This command shows the list of all the background processes.
                                  
[email protected]:~$ bg

fg This command brings the most recent process to foreground.
                                  
[email protected]:~$ fg

fg n This command brings the process n to the foreground.
                                  
[email protected]:~$ fg   -n








Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.