htop command in Linux with examples Last Updated : 06 Oct, 2024 Comments Improve Suggest changes Like Article Like 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. Syntaxhtop This will open an interactive interface showing all running processes, along with CPU, memory, and swap usage. You can also specify options when launching htop.Basic Example:Common Options used with htop command Here are some of the most commonly used options with htop:Option Description-d <delay>sets the delay between updates (delay of some sec)-u <user>displays only the process which owned by the user-p <pid>shows only process with specific ids.-s <column>sorts the process of the given column-t displays the process hierarchy in tree view in the commands column--no-colorRuns htop in monochrome mode, disabling colorhtop command Examples in Linux1. htop -d <delay>: htop -d 10 means shows delay between screen updates in 1 second. If you give delay as 15 means delay of 1.5 sec, similarly 23 means 2.3 sec etc. This delay is useful as it reduce frequent updates.Before adding delayAfter adding delay of 302. htop -u <username>: Used to show only the processes of a given user. Here it is:htop -u kunwarvikas3. htop -p <pid>: Used to show only the given PIDs.htop -p 3694. htop -s <column>: Sorts the given column.htop -s PRIORITY5. htop -t: Displays the process hierarchy in tree view in the commands column. 6. htop -no-color: Disables color. 7. -v --version:Output version information and exit. Interactive CommandsArrows, 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 - HelpF2 - setupF3 - 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.ConclusionThe htop command is a powerful tool for monitoring and managing system processes in real-time. With its interactive interface and advanced features like sorting and filtering, it will be beneficial for system administrators and users who want a detailed view of system performance. Comment More infoAdvertise with us Next Article htop command in Linux with examples K KV30 Follow Improve Article Tags : Linux-Unix linux-command Linux-system-commands Similar Reads halt command in Linux with examples This command in Linux is used to instruct the hardware to stop all the CPU functions. Basically, it reboots or stops the system. If the system is in runlevel 0 or 6 or using the command with --force option, it results in rebooting of the system otherwise it results in shutdown. Syntax: halt [OPTION] 2 min read hash command in Linux with examples The `hash` is a command in Linux that helps in managing the hash table. It facilitates with mapping the names of executable files to their locations on disk. It helps in speeds uping the commands execution by remembering paths of frequently used commands. It uses the `hash` to view hashed commands ( 5 min read hdparm command in Linux with Examples "hdparm" (i.e., hard disk parameter) is one of the command line programs for Linux that is used to handle disk devices and hard disks. With the help of this command, you can get statistics about the hard disk, alter writing intervals, acoustic management, and DMA settings. It can also set parameters 4 min read Head Command in Linux With Examples Need to quickly view the beginning of a file in Linux? The head command is your best option. This essential command-line tool enables users, developers, and system administrators to preview the start of log files, configuration files, CSV datasets, and other text documents in seconds.The head comman 6 min read help Command in Linux with examples If youâre new to the Linux operating system and struggling with command-line utilities, the help command is one of the first tools you should learn. As its name suggests, the 'help' command provides detailed information about built-in shell commands, making it an essential resource for beginners and 5 min read hexdump command in Linux with examples The 'hexdump' command in Linux is a versatile utility used to display file content or data from standard input in a human-readable format. It is invaluable for programmers and system administrators for debugging binary data, analyzing file structures, and verifying data integrity. Here we will get a 5 min read How to Display Command History in Linux | history Command The history command in Linux is essential for terminal users, enabling them to view, search, and manipulate previously executed commands. Now, mastering this Linux command allows for efficient commands of commands, automation of repetitive tasks, and troubleshooting without the need to retype length 3 min read host command in Linux with examples host command in Linux system is used for DNS (Domain Name System) lookup operations. In simple words, this command is used to find the IP address of a particular domain name or if you want to find out the domain name of a particular IP address the host command becomes handy. You can also find more s 2 min read hostid command in Linux with examples hostid is a command in Linux that is used to display the Host's ID in hexadecimal format. It provides a quick and straightforward way to retrieve the host ID, allowing administrators to associate it with software licenses or perform system-specific operations. Syntax of `hostid` command in Linuxhost 1 min read hostname command in Linux with examples hostname command in Linux is used to obtain the DNS (Domain Name System) name and set the system's hostname or NIS (Network Information System) domain name. A hostname is a name given to a computer and attached to the network. Its main purpose is to uniquely identify over a network. Syntax of the `h 5 min read Like