Skip to main content

Command Palette

Search for a command to run...

how to use top command in Linux

Updated
1 min readView as Markdown
D

Owner of howtouselinux.com. I work as a Linux engineer for over 20 years. Now I am a technical blogger and Software Engineer. I enjoy sharing learning and contributing to open-source.

1) 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 repetitions. top -n 10

2) Display Specific User Process

top -u paras

3) 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

4) Shows Absolute Path of Processes: Press ‘c‘ option in running top command, it will display absolute path of running pro

5) Kill running process: 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.

6) Sort by CPU Utilisation: Press (Shift+P) to sort processes as per CPU utilization.

7) Shows top command syntax: top -h

8) Batch Mode : Send output from top to file or any other programs.

top -b

9) Secure Mode : Use top in Secure mode.

top -s

10) Command Line : The below command starts top with last closed state.

Top -c

11) Delay time : It tells delay time between screen updates.

Top -d seconds.tenths

12) top sort by memory

top -o +%mem

More from this blog

Linux Skills

26 posts