≡ Menu

Show All Running Processes in Linux

How do I see all running process in Linux operating systems using command line or GUI options?

You need to use the ps command. It provide information about the currently running processes, including their process identification numbers (PIDs). Both Linux and UNIX support the ps command to display information about all running process. The ps command gives a snapshot of the current processes. If you want a repetitive update of this status, use top, atop, and/or htop command as described below.

Apart from ps command, you can also use the following commands to display info about processes on Linux:

  1. top command : Display and update sorted information about processes.
  2. atop : Advanced System & Process Monitor.
  3. htop : Interactive process viewer.

The ps command

Type the following ps command to display all running process:
# ps aux | less

  • -A: select all processes
  • a: select all processes on a terminal, including those of other users
  • x: select processes without controlling ttys

Task: see every process on the system

# ps -A
# ps -e

Task: See every process except those running as root

# ps -U root -u root -N

Task: See process run by user vivek

# ps -u vivek

Task: top command

The top program provides a dynamic real-time view of a running system. Type the top at command prompt:
# top

Fig.01: top command: Display Linux Tasks

Fig.01: top command: Display Linux Tasks

To quit press q, for help press h.

Task: display a tree of processes

pstree shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted. If a user name is specified, all process trees rooted at processes owned by that user are shown.
$ pstree
Sample outputs:

Fig.02: pstree - Display a tree of processes

Fig.02: pstree - Display a tree of processes

Task: Print a process tree using ps

# ps -ejH
# ps axjf

Task: Get info about threads

Type the following command:
# ps -eLf
# ps axms

Task: Get security info

Type the following command:
# ps -eo euser,ruser,suser,fuser,f,comm,label
# ps axZ
# ps -eM

Task: Save Process Snapshot to a file

Type the following command:
# top -b -n1 > /tmp/process.log
Or you can email result to yourself:
# top -b -n1 | mail -s 'Process snapshot' you@example.com

Task: Lookup process

Use pgrep command. pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria to screen. For example display firefox process id:
$ pgrep firefox
Sample outputs:


Following command will list the process called sshd which is owned by a user called root:
$ pgrep -u root sshd

Say hello to htop and atop

htop is interactive process viewer just like top, but allows to scroll the list vertically and horizontally to see all processes and their full command lines. Tasks related to processes (killing, renicing) can be done without entering their PIDs. To install htop type command:
# apt-get install htop
# yum install htop
Now type the htop command at the shell prompt:
# htop
Sample outputs:

Fig.03: htop - Interactive Linux / UNIX process viewer

Fig.03: htop - Interactive Linux / UNIX process viewer (click to enlarge)

atop program

The program atop is an interactive monitor to view the load on a Linux system. It shows the occupation of the most critical hardware resources (from a performance point of view) on system level, i.e. cpu, memory, disk and network. It also shows which processes are responsible for the indicated load with respect to cpu- and memory load on process level; disk- and network load is only shown per process if a kernel patch has been installed. Type the following command to start atop:
# atop
Sample outputs:

Fig.04: atop command in action

Fig.04: atop command in action

See also:
Share this tutorial on:
{ 130 comments… add one }
  • domNovember 26, 2007, 5:15 pm

    i hope you dont mind, i have borrowed your image showing PS for my assigment, i have have referenced this site and the date


    • markOctober 20, 2013, 6:29 am

      been tinkering with linux for 2 years, still have to reference some basic commands. If I had a penny for how many times I’ve gone something along the lines of “urh, how do I merge folders with cp again” *google, spots cyberciti* , they’ll probably have some good examples..

  • saurabhFebruary 20, 2008, 10:23 pm

    No offense, but this is akin to posting instructions on how to walk.

    • blablablaMay 30, 2010, 1:54 am

      You are a an elitest jerk. Interesting that for someone who believes he already knows everything, you are entirely ignorant of this fact. It is likely that no one was impressed by your comment except yourself.

      • CytraxJune 6, 2010, 10:54 am

        Don’t worry, he wrote his original lame comment back in 08. He’s probably less ignorant now.

        Great article!

        • steveSeptember 10, 2011, 11:47 pm

          The guy is an idot

        • cyberitJanuary 23, 2013, 12:14 am

          ‘last updated at JULY 6, 2012’ or may be in 2008 it was! Btw – I have to still meet some one who was born walking.

    • saurabhIsGayOctober 14, 2013, 3:46 pm
    • HerpDerpingtonJuly 14, 2015, 2:41 am

      Nice try asshole. People brand new to Linux are actually learning how to walk again, and this is important information.

  • jayMarch 7, 2008, 1:38 am

    @saurabh – I’m glad you think this is like posting instructions on how to walk. I’m also glad that you are such a naturally gifted user that you knew this without ever having to look up how to do this. Some of us have just started using Linux and guess what it is small little tid bits like this that help.

  • anyaMarch 11, 2008, 9:28 pm

    Thanks a lot for the info. It proved really useful. Sometimes it helps when somebody tells you how to walk…

  • MariaMarch 26, 2008, 10:31 am

    It’s fantastic to know that a great community is behind it.


  • JamalMay 15, 2008, 6:19 pm

    can someone tell me how to create a script that list all processes that are taking more than 10% of cpu time?


    btw i am a noob lol

  • dddJuly 6, 2008, 11:11 pm

    Great! Thanks

  • akinhowtowalkAugust 8, 2008, 10:39 pm

    @saurabh no offense, are you an Indian? If so, that explains and if not, set up your own site and don’t post anything on it loser.

    Great stuff.

    • I'm a INDIANSeptember 14, 2010, 7:40 pm

      what the hell do u know about indian? shut the hell up and do some linux home work kiddo..

    • the london dudeOctober 3, 2010, 2:32 pm

      @akinhowtowalk: i’m so glad you’ve demonstrated so much more maturity than saurabh through your sweeping generalization.

    • ritwikFebruary 15, 2013, 9:09 am

      The guy who wrote the article is also indian. His name is Vivek

  • WebDesignKingSeptember 8, 2008, 2:42 pm

    Lol @ akinhowtowalk. Well said!

    Great resource

    • hkhkJanuary 2, 2012, 6:29 am

      Hahah indians are the most dumb nation and yes smelly tooo :)

      • ankyApril 4, 2012, 6:45 am

        shut up man…mind ur tounge..wt u knw abt indians???

      • True_IndianJanuary 13, 2014, 9:23 am

        How dare you say a thing about our beautiful country, u BMF?

        • pyrolightingFebruary 6, 2014, 3:54 pm

          amazing how something like a simple request for a bit of help on a topic can lead to racist banter….

          keep it simple, keep it clean, don’t be judgmental of Indians or any other race, and STAY ON the TOPIC of the THREAD!!

          // and yes, everyone needs to learn how to walk, and how to do the basics, before they can move to more advanced things…..

          • webManMay 8, 2015, 2:52 pm

            @pyrolighting VERY WELL SAID

          • pcj52March 27, 2016, 10:01 pm

            Well said, thank you.

  • sarmadNovember 6, 2008, 6:42 am

    i want to know how can i run command that show me which script is currently running and by which user

  • AllimuthuDecember 25, 2008, 7:27 pm

    Hi Everybody, I got an cleared information in this site. But I want to know that what are the process currently active in my shell. If any body know, please email me @ allimut@gmail.com


  • mellow_bunnyJanuary 14, 2009, 10:29 pm

    Yo thanks heaps for this info! It’s just what I needed! *favourited*

  • GregJanuary 29, 2009, 6:21 pm

    akinhowtowalk good answer for the loser :D

  • KenFebruary 8, 2009, 9:25 pm

    I’ve been walking the Linux path for a long time and it’s nice to see this type of command posted.

    To see what is running and consuming resources you could use (exactly as it is shown):
    ps -e -o pcpu,cpu,nice,state,cputime,args –sort pcpu | sed “/^ 0.0 /d”

    which is nice to enter into the .bashrc in your home directory as an alias. Like this (on the last line after every other entry):
    alias hog=’ps -e -o pcpu,cpu,nice,state,cputime,args –sort pcpu | sed “/^ 0.0 /d”‘

    so the next time I log in I can just type hog at the command line and see all process running and consuming resources, sorted.


  • unokpasabaxakiFebruary 16, 2009, 8:51 pm

    In the path of Linux, if you want to start running without knowing how to walk, what will happen? Begginers know that they can get to the top, but step by step. Otherwise, they’ll fall. And let’s stop the metaphores xD

  • vivekFebruary 21, 2009, 4:09 am


    Any one help to find command history with date & time.

    • vahujaOctober 7, 2014, 2:42 pm

      $ HISTTIMEFORMAT=”%d/%m/%y %T ”
      $ echo ‘export HISTTIMEFORMAT=”%d/%m/%y %T “‘ >> ~/.bash_profile
      %d – Day
      %m – Month
      %y – Year
      %T – Time
      To see history type
      $ history

  • SleepWalkerApril 1, 2009, 8:16 pm

    Thank you. found it very useful :)
    Lol@akinhowtowalk well said :)
    ILoveTakingHelp :P

  • the mad hatterMay 18, 2009, 2:49 pm

    Thanks for posting this ! You’ve helped me a lot !

  • HomeHacker2May 20, 2009, 5:20 pm

    thanks for that. i needed this to set something running and set-up on a linux server. but i needed to kill it first so :)thanks.

  • chinmayMay 26, 2009, 5:44 am

    hello akinhowtowalk

    i find this site really usefull and find the stuff what i was looking for…
    and saurabh’s comment was not justified…
    but what was ur comment on being an indian… i really didnt understood that…and y..
    that explains wat..??

  • JoJune 24, 2009, 5:55 am

    Thanks for the htop info, really useful tool!!!

  • radutirJuly 12, 2009, 2:57 pm

    it’s nice
    thx a lot for this tool

  • guyAugust 2, 2009, 1:09 pm

    Hey, can someone please give me instructions on how to walk?

    • rooMarch 18, 2013, 3:33 pm

      Will this do?

      1. Stand up with feet together.
      2. Put one foot forward of the other foot.
      3. Put other foot in front of the one you just moved.
      Repeat #s 2 and 3 until you have reached your destination.

      • MMay 11, 2015, 7:40 am

        I tried, but got some error messages.

        Warning: proceeding can cause stability issues in the system
        Warning: bad pathway
        Process KNEE broken, terminating.

        Can you help?

  • stuck hereAugust 7, 2009, 6:33 am

    Since I learnt how to use ps I forgot how to walk. Anyone know the neccessary commands?

  • PaNdaAugust 19, 2009, 1:08 am

    Cool instruction, i dont know there were commands that named “TOP”

    and…… i forget how to walk =( *(googling how to walk)

  • Ray_DAugust 25, 2009, 6:57 pm

    saurabh, were you born walking? Didn’t think so.

  • CameronSeptember 8, 2009, 9:58 pm

    saurabh takes baby steps as he is always half drunk

  • ChongopantsSeptember 24, 2009, 7:17 pm

    saurabh, stfu..

    that is all you may go on with your sad life.

  • saurabh-is-a-retardOctober 24, 2009, 9:43 am

    how do you expect newbies to learn if people don’t post stuff like this?

  • kekOctober 27, 2009, 12:42 am

    netstat -tulnap

    This command is usefull when you whant to know what process is responsible for each open port.

  • wat.November 18, 2009, 10:21 am

    I’m amazed that more then one and a half year after a person has posted a single message,
    Chongopants 09.24.09 at 7:17 pm
    saurabh, stfu..
    that is all you may go on with your sad life.
    something like this is still said

  • Nicolas PinçonMarch 9, 2010, 9:47 pm

    very helpful page!! Thx a lot to whoever wrote it

  • verizon sagaMay 4, 2010, 2:24 pm

    thankz very much master ..

    its a good post .. and very usefull for me :)

    htop :D i was find for more times

  • abhishekMay 19, 2010, 7:21 pm


    Don’t generalize, not all Indians are like saurabh. Grow up. Boasting exists irrespective of race.

  • SumitJune 2, 2010, 7:02 am

    @akinhowtowalk – I am really offended by your remarks on a specific nation. I dont expects mature guys to make such kind of remark. really very disappointing (i can also go dirty in reaction but i dont prefer to). Make sure you comment on individual and not on any group/society/nation.

    @Saurabh – If you are an expert then i will appreciate you posting advance topics on linux and punlish the URL on this forum. If you cant do that much for community then you dont have any rights to comments on someones contribution.

    • ashishApril 7, 2013, 8:08 am

      nice reply.
      well put,
      and well explained to both of our friends concerned.

      And btw, This was an Awesome post! :)

  • AnonymousJune 20, 2010, 4:36 pm

    i probably think saurab never came back to this page after he commented on it. You guys were so foolish enough to comment back . lol
    I was just looking for something that can give me the green signal so that i can quit all running processes before i shut my computer…. And i ended up here. Looks i i still cant get what i should type to see only those processes that are running currently. Some thing like the task manager in windows . Any help with that ?

    • agreeSeptember 27, 2011, 8:02 pm

      Green Signal !

      Please go ahead and reboot

  • luisJune 22, 2010, 4:21 am

    Thanks =)

  • noufalcmJuly 19, 2010, 12:31 pm

    I wanted to display only PID and Process name in MAC OS. “ps” doesn’t display process name rather command only. Can Anyone help.
    Thanx & regards in advance

  • DaveUKSeptember 12, 2010, 3:09 pm

    I am a complete newbie to linux and I *am* learning to walk with it,, so thanks for the article :)

  • AndyCSeptember 30, 2010, 6:18 am

    akinhowtowalk probably said that regarding Indians coz he knows that Indians are smarter .. atleast they make our Business run smoothly ..cheers :)

  • AlexOctober 7, 2010, 8:07 pm

    Thanks. In an introduction to UNIX class, this helped out and quicker than looking it up in my textbook.

  • MuthukrishnanNovember 25, 2010, 5:33 am

    Very userful.. Thanks a lot…..!!

  • PankajDecember 24, 2010, 5:41 pm

    Nice….. got geat help…. Thanks…

  • WayneMarch 28, 2011, 1:08 pm

    Great Site.
    Well written articles.
    And Just to keep it going…
    Why walk when you can run with Linux!!

  • L.PRINCE RAJApril 5, 2011, 2:10 am

    I am using Fedora 14 in my laptop. I installed an .rpm file , but i don’t know how to run that software. please help me. I am new for Linux.

    • WayneApril 5, 2011, 10:12 am

      Well I think the first best question that needs to be asked is what software have you installed?

  • L.PRINCE RAJApril 5, 2011, 12:10 pm

    I installed an CFD software named as ‘ZNTutor-CFD-2.1.0-0.i386.rpm’. the installation is successful.

    • WayneApril 5, 2011, 11:58 pm

      As this is a commercial program I wont be installing it to have a look. I would suggest asking the question in a forum more related / dedicated to this product. Also have a look to find where the package was installed and read the manual that was supplied.
      If this manual doesn’t even cover the simple processes I would be a little worried about it considering the subject matter involved.

  • L.PRINCE RAJApril 6, 2011, 12:41 am

    Ok I will try to get that..

  • soundarapandianApril 6, 2011, 7:28 am

    Thanks very useful

  • gabeMay 11, 2011, 2:53 pm

    Very useful keep going on!

  • EfimMay 18, 2011, 11:17 am

    Very laconic and very good article

  • NewToLinuxJune 7, 2011, 9:56 pm

    Thanks a lot Vivek for taking the time to post the help for these commands in a detailed manner!

  • jeffJune 30, 2011, 12:43 pm

    Thanks for the help, I found the problem right off!

  • dizzyJuly 14, 2011, 8:47 pm

    Very useful, thanks!

  • kebirajJuly 15, 2011, 12:45 pm


    i’m running one process in linux server with the common user that is using by 20 people from different windows machine, i want to know who executed the command at what time in the linux server? is there any file/log location that having all the commands that executed in the server.

    Thanks in adv,

  • n00bAugust 3, 2011, 10:24 am

    very useful commands, thanks to OP.

    Thanks to everyone else for the amusing read lol

  • justme19August 6, 2011, 3:34 pm

    Thanks a lot for this articles. I searched for one solution and found several in one page. God bless u Vivek for making some of us who are new and started to “walk” with Linux, and for those unjustified comments..well just ignored them.

  • sherilSeptember 20, 2011, 12:52 am

    Thanks, Well explained.

  • sureshattOctober 10, 2011, 6:41 am

    Great article. Thank you very much. And one thing to remember for all linuxholics, “Linux is for human being’s goodness” , sharing is the fuel that runs the community. Share everything even if you think it is less important, because there are many people who are looking for a point to startup. Knowing Linux means nothing if you don’t know the great philosophy behind it.

  • MomoOctober 19, 2011, 5:40 pm

    Many thanks for posting those instructions.

  • FredOctober 20, 2011, 11:41 pm

    Great work, very clear instruction. I’ve been using Linux for 2 years and still believe there’s a lot for me to learn or I should say to know. Pages like this makes a huge difference for learners who try and never give up. I really appreciate the time and efforts of the author, keep it up my friend. As for the guy with “walk” comment I’d like to say you don’t have to read what you don’t like, at least give this guy the credit for the time and effort for putting this together for the world and, go ahead and show the world what you’re ca[able of.


  • alvarobspOctober 21, 2011, 2:15 am

    @saurobh: Successful troll is successful. lol

    Really helpful post, thanks :)

  • shailendraNovember 15, 2011, 3:48 am

    thank u sir

  • RaghavNovember 22, 2011, 11:06 am

    Can any one tell me how can i list all the processes launched from a directory and sort them to find the process which is consuming more memory than others.
    We are using AIX.
    Please help me.

  • chapiseNovember 24, 2011, 1:26 am

    thanks so much dude.., it really helps me, i’m new in linux

  • harshaDecember 13, 2011, 6:58 pm

    good work…thanks :)

  • meowDecember 16, 2011, 12:53 am

    Nice, thanks.

  • ash7December 18, 2011, 8:01 am

    good post. quite useful.

  • encikkelantanJanuary 4, 2012, 1:00 am

    hello,i wonder,how to know the details of user who run specific processes?

  • lanhJanuary 8, 2012, 7:47 am

    Good stuff thx!

  • ShazaFebruary 10, 2012, 8:09 am

    bkmraaster on November 6, 2011 Oh well why not give it a shot, there’s nothing to lose, so I guess there’s everything to win! And cmon who doesn’t like sony products!

  • ahmedMarch 14, 2012, 6:57 pm

    i love you

  • RafaelMarch 15, 2012, 12:42 pm

    Thanks for your article, help me a lot!

  • Edward BeckettJuly 6, 2012, 6:28 am

    This site’s one of the best resources for nix noobs … much prec

  • arifJuly 7, 2012, 2:31 pm

    i have run vacum but still the problem not yet solved

    [root@onms-dr mysql]# /etc/init.d/opennms start
    Starting OpenNMS: org.postgresql.util.PSQLException: FATAL: database is not accepting commands to avoid wraparound data loss in database “postgres”
    OpenNMS runs better if you start up the database first.

  • SatishSeptember 17, 2012, 1:40 pm

    you can also view all the running process by running the below command

    service –status-all

  • AhsanSeptember 28, 2012, 8:06 am

    Nice site… for noobs :)

  • ToppyOctober 5, 2012, 5:43 am

    I’ve just boomarked the website, it’s useful for my jobs.

  • Min ThuOctober 19, 2012, 5:20 am


  • yashNovember 7, 2012, 4:50 pm

    how can I print the virtual pages allocated to the currently running processes on my system and also the page faults associated with them?

  • AlexisDecember 12, 2012, 6:34 am

    Yip years later this is still a useful page. Didn’t know about htop, quite like it.

    I thought I saw a comment asking how to show processes for a user.
    top -u root
    htop -u root

  • PrateekDecember 19, 2012, 4:03 am

    great stuff and that htop thing was really useful


  • NikolaJanuary 8, 2013, 5:10 am

    Nice tut, i love htop, it’s very good :)

  • TravisJanuary 10, 2013, 8:11 pm

    Thanks for the contribution!

    P.S. Don’t feed the trolls.

  • sunidhiMarch 15, 2013, 11:10 am

    hello everyone will u pls tell me use of sort -o cmd

  • Richard BlaineMarch 22, 2013, 10:47 pm

    Thank you much. The information might be dated, but still very relevant. Good Stuff.

  • I am an IndianApril 12, 2013, 7:08 am

    Great article thanks to author for this nice help.
    To all those above blaming Indian in any mean, just google our statistics over technology, you will see that you people are learning from Indian.So dont angry me again

    • IfOnlySeptember 3, 2016, 1:57 pm

      Lots of racism in America (and elsewhere), sadly. Chump still getting almost half the poll; his ratings have dipped a little after a series of spectacular gaffes and public GOP infighting, but that probably mostly just reflects the natural reticence of some voters to tell opinion pollsters to their face that they’re a racist, and not an actual opinion shift. (In the UK such opinion polling reticence at the clipboard-face produced the “shy Tory” and “shy Brexiteer” phenomena in 1992 and 2016, which badly overestimated Labour and Remain support respectively, and predicted the opposite results to actual). Rednecks seem to prevail in America, and in my estimation a Chump presidency remains a very real risk.

      The Indian space programme is well-resourced and impressively ambitious. By way of contrast, the British space programme is run on a shoestring from a garden shed in Leicester. Its crowning achievement was the BEAGLE2, which was made from old Sqezy washing-up liquid bottles and sticky-backed plastic. BEAGLE2’s signal lasted for about 20 seconds before fading away with a whimper, leading Prof. Colin Pillinger to lament: “If only Britain had applied to India for overseas aid, we could have afforded a second reel of sticky-backed plastic to hold the undercarriage together and BEAGLE2 would still be transmitting”.

  • MarcoJune 28, 2013, 3:00 pm

    To show all active services, both upstart and chkconfig, try:

    ( chkconfig –list | grep :on | sed ‘s/ .*//’ ; initctl list | grep process | sed ‘s/ .*//’ ) | sort

  • ChaitanyaOctober 28, 2013, 3:11 am

    Dear Friends,

    How to check that specific process is working fine or not for eg. HeartBeat manager, IKEN process, FSM, LSTP etc etc.

    kindly suggest

    Chaitanya Mahamana

  • IBRAHIMOctober 31, 2013, 11:29 pm

    which command shows who is currently on the system and their processes?

  • MarcoNovember 28, 2013, 10:46 pm


  • xsgluoziFebruary 16, 2014, 12:00 pm

    Great article, thanks a lot.

  • latereactionApril 21, 2014, 10:31 pm

    helpful post and funny thread. Great read! ;)

  • racemasterJune 25, 2014, 7:51 pm

    Awesome article!!!!!!!!!!!!!!!!!!

  • PaulineFebruary 9, 2015, 9:01 am

    I need a HELP on which command should I check for the running services.

  • James BrownFebruary 24, 2015, 5:37 am

    Great. Thats what I was looking for :)

  • davidJune 26, 2015, 7:56 pm

    nice, love linux

  • PrabhakarJuly 5, 2015, 6:56 am

    Good one. Thanks.

  • cescgieNovember 2, 2015, 10:51 am

    nice info. thx

  • JeyarajFebruary 10, 2016, 9:23 am

    very helpfull……..this site….

  • sreedhar reddyFebruary 26, 2016, 10:55 am

    Thank you very much.
    very nice session

  • TikyApril 9, 2016, 9:42 pm

    Thank you for sharing this information about Linux.

  • periklisApril 13, 2016, 8:11 pm

    Thank you for sharing very good article!

  • screw indiansMay 10, 2016, 9:46 am

    indians R stoopid lmao XD

  • tony-nonymousMay 22, 2016, 3:06 am

    I’m glad you posted this page, so I can remember how to use “top” and “ps aux”, or maybe I’d forget. I walk frequently, so I don’t typically forget how to walk, but if I do, I will just “google it”.

  • IfOnlySeptember 3, 2016, 12:28 pm

    Wonderful article, cyberciti. Linux and Unix are not particularly easy systems for neophytes fed to date by the Windows spoon. Many commands are weird short sequences of bald alphanumeric characters, and the hot sequences to use for a given task just have to be learned and accumulated starting from a blank slate.

    Please could you consider possibly doing another “How To” article, this time on the seemingly impenetrable technical subject of “How Linux Users can express their disagreements with each other in a civil and dignified manner”.

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , , , , , , , , , , , , , , , , , ,