12 TOP Command Examples in Linux

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.95/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

72 Responses

  1. Sairam says:

    much usefull and clear explanation of the command with screenshots..also simple and easy to understand

  2. Victor says:

    Can someone please help me to gather only the top 20 processes information from the top command into a file after each 60 seconds of interval?

  3. harsha says:

    Excellent Ravi,

    Thank you for you information..

  4. Abhishek Sharma says:

    Hi Ravi

    Point 10 saving top’s output to a file saves it configuration instead.
    Please suggest in that,correct it if its wrong.
    PFB output.

    RCfile for “top with windows” # shameless braggin’
    Id:a, Mode_altscr=0, Mode_irixps=0, Delay_time=3.000, Curwin=0
    Def fieldscur=AEHIOQTWKNMbcdfgjPlrsuvyzX
    winflags=62777, sortindx=15, maxtasks=0
    summclr=1, msgsclr=1, headclr=3, taskclr=1
    Job fieldscur=ABcefgjlrstuvyzMKNHIWOPQDX
    winflags=62777, sortindx=0, maxtasks=0
    summclr=6, msgsclr=6, headclr=7, taskclr=6
    Mem fieldscur=ANOPQRSTUVbcdefgjlmyzWHIKX
    winflags=62777, sortindx=13, maxtasks=0
    summclr=5, msgsclr=5, headclr=4, taskclr=5
    Usr fieldscur=ABDECGfhijlopqrstuvyzMKNWX
    winflags=62777, sortindx=4, maxtasks=0
    summclr=3, msgsclr=3, headclr=2, taskclr=3

    • Ravi Saive says:


      Yes its just only saves top configuration, to save the top running output to a file use the following command.

      # top -n 1 -b > top-output.txt
  5. LTTR says:

    This is very helpful. Is there a guide to definitions of all the top headers? i.e. PR, NI etc.

  6. Alex says:

    This was VERY helpful for my OCR Computing Controlled Assesment, thanks!

  7. TecGeeks says:

    If server has multiple processor suppose (3) is CPU usage will show 300% in top command or consolidate under 100%, and How can we see individual CPU Usage if server has multiple processors

  8. Srinivas says:

    Ravi, it’s good collection of examples. Each and every details covered. Want to see more of this kind of work

  9. Fatiha says:

    Thank you very much ! Very helpful and useful.

    Now I use : top -u myUser

  10. Prince says:

    Hello, I was wondering if anyone could help me by evaluating the usefulness of the top command to a technician when using it with ps and kill in order to investigate a system that is misbehaving. Thank you.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *