• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Wednesday, May 21, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

12 TOP Command Examples in Linux

How VPS by How VPS
November 2, 2018
in Linux, Operating System
0
0
SHARES
40
VIEWS
Share on FacebookShare on Twitter

Contents

  1. 1. Display of Top Command
  2. 2. Sorting with -O (Uppercase Letter ‘O’).
  3. 3. Display Specific User Process
  4. 4. Highlight Running Process in Top
  5. 5. Shows Absolute Path of Processes
  6. 6. Change Delay or Set ‘Screen Refresh Interval’ in Top
  7. 7. Kill running process with argument ‘k’
  8. 8. Sort by CPU Utilisation
  9. 9. Renice a Process
  10. 10. Save Top Command Results
  11. 11. Getting Top Command Help
  12. 12. Exit Top Command After Specific repetition

This is the part of our on-going series of commands in Linux. We have covered basic ls command and cat command. In this article, we are trying to explore top command which is one of the most frequently used commands in our daily system administrative jobs. top command displays processor activity of your Linux box and also displays tasks managed by kernel in real-time. It’ll show processor and memory are being used and other information like running processes. This may help you to take correct action. top command found in UNIX-like operating systems.

12 TOP Command Examples in Linux

Linux Top Command Examples

You might also be interested in following tutorials :

  1. Htop (Linux Process Monitoring) tool for RHEL, CentOS & Fedora
  2. Iotop (Monitor Linux Disk I/O) in RHEL, CentOS and Fedora

1. Display of Top Command

In this example, it will show information like tasks, memory, cpu and swap. Press ‘q‘ to quit window.

# top
12 TOP Command Examples in Linux

Linux Top Command

2. Sorting with -O (Uppercase Letter ‘O’).

Press (Shift+O) to Sort field via field letter, for example press ‘a‘ letter to sort process with PID (Process ID).

12 TOP Command Examples in Linux

Sorting Process ID’s with Top

Type any key to return to main top window with sorted PID order as shown in below screen. Press ‘q‘ to quit exit the window.

12 TOP Command Examples in Linux

Sorting Process ID’s

3. Display Specific User Process

Use top command with ‘u‘ option will display specific User process details.

# top -u tecmint
12 TOP Command Examples in Linux

Top with Specific User Processes

4. Highlight Running Process in Top

Press ‘z‘ option in running top command will display running process in color which may help you to identified running process easily.

12 TOP Command Examples in Linux

Top Process with Colorful

5. Shows Absolute Path of Processes

Press ‘c‘ option in running top command, it will display absolute path of running process.

12 TOP Command Examples in Linux

Top with Specific Process Path

6. Change Delay or Set ‘Screen Refresh Interval’ in Top

By default screen refresh interval is 3.0 seconds, same can be change pressing ‘d‘ option in running top command and change it as desired as shown below.

12 TOP Command Examples in Linux

Top – Set Refresh Time

7. Kill running process with argument ‘k’

You can kill a process after finding PID of process by pressing ‘k‘ option in running top command without exiting from top window as shown below.

12 TOP Command Examples in Linux

Top – Kill Process ID

8. Sort by CPU Utilisation

Press (Shift+P) to sort processes as per CPU utilization. See screenshot below.

12 TOP Command Examples in Linux

Top – High CPU Utilization

9. Renice a Process

You can use ‘r‘ option to change the priority of the process also called Renice.

12 TOP Command Examples in Linux

Top – Renice Process

10. Save Top Command Results

To save the running top command results output to a file /root/.toprc use the following command.

# top -n 1 -b > top-output.txt
12 TOP Command Examples in Linux

Top Command Save Results

11. Getting Top Command Help

Press ‘h‘ option to obtain the top command help.

12 TOP Command Examples in Linux

Top Command Help

12. Exit Top Command After Specific repetition

Top output keep refreshing until you press ‘q‘. With below command top command will automatically exit after 10 number of repetition.

# top -n 10

There are number of arguments to know more about top command you may refer man page of top command. Please share it if you find this article useful through our comment box below.

Source: tecmint.com

Tags: Linux Commandslinux guidelinux vps setup guide
Previous Post

8 Useful Commands to Monitor Swap Space Usage in Linux

Next Post

5 ‘chattr’ Commands to Make Important Files IMMUTABLE (Unchangeable) in Linux

Next Post

5 ‘chattr’ Commands to Make Important Files IMMUTABLE (Unchangeable) in Linux

Leave a Reply Cancel reply

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

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet