The Wayback Machine - https://web.archive.org/web/20240122030902/https://www.geeksforgeeks.org/htop-command-in-linux-with-examples/
Open In App
Related Articles

htop command in Linux with examples

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

htop command in Linux system is a command line utility that allows the user to interactively monitor the system’s vital resources or server’s processes in real time. htop is a newer program compared to top command, and it offers many improvements over top command. htop supports mouse operation, uses color in its output and gives visual indications about processor, memory and swap usage. htop also prints full command lines for processes and allows one to scroll both vertically and horizontally for processes and command lines respectively.

Syntax:

htop [-dChusv]

Example:

Options:

  • -d –delay : Used to show the delay between updates, in tenths of seconds.
  • -C –no-color –no-colour : Start htop in monochrome mode.
  • -h –help : Used to display the help message and exit.
  • -u –user=USERNAME : Used to show only the processes of a given user.
    htop -u kunwarvikas

  • -p –pid=PID, PID… : Used to show only the given PIDs.
  • -s –sort-key COLUMN : Sort by this column (use –sort-key help for a column list).
  • -v –version : Output version information and exit.

Interactive Commands:

  • Arrows, Page Up, Page Down, Home, End: Scroll the process list.
  • Space: Tag or untag a process.
  • U – Untag all processes (remove all tags added with the Space key).
  • s – Trace process system calls.
  • F1 – Help
  • F2 – setup
  • F3 – search
  • F4 – filtering: type in part of a process command line and only processes whose names match will be shown.
  • F5 – Tree view.

  • F6 – Sorting.
  • F7 – Increase the selected process’s priority. This can only be done by the superuser.
  • F8 – Decrease the selected process’s priority.
  • F9 – Kill process.
  • F10 – Quit.
Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 21 May, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials