{"id":682,"date":"2016-10-28T00:00:00","date_gmt":"2016-10-28T00:00:00","guid":{"rendered":"http:\/\/blog.hostinger.io\/hostinger-tutorials\/uncategorized\/vpshow-to-manage-processes-in-linux-using-command-line\/"},"modified":"2025-03-05T07:27:07","modified_gmt":"2025-03-05T07:27:07","slug":"linux-list-processes","status":"publish","type":"post","link":"\/my\/tutorials\/how-to-list-processes-in-linux","title":{"rendered":"How to check and list running processes in Linux"},"content":{"rendered":"<p>In Linux, processes are instances of running programs or commands. A single application can run multiple processes to handle different tasks. For example, a web browser creates separate processes for each open tab.<\/p><p>Listing these processes helps you maintain a healthy Linux system by identifying resource-hungry tasks and detecting potential bottlenecks.<\/p><p>This article will guide you through listing active processes in Linux using various commands. You&rsquo;ll learn how to monitor your system&rsquo;s performance effectively and troubleshoot issues before they impact stability.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Linux-Commands-Cheat-Sheet.pdf\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"1024\" height=\"283\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet-1024x283.png\" alt=\"\" class=\"wp-image-69262\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-1536x425.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-300x83.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-150x41.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet-768x212.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2022\/11\/Linux-cheat-sheet.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><p>\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-understanding-processes-in-linux\">Understanding processes in Linux<\/h2><p>Linux processes can run either in the <strong>foreground<\/strong> or <strong>background<\/strong>.<\/p><p>Foreground processes directly interact with the user, like running a command in a terminal window. In contrast, background processes operate silently without requiring user input, such as system monitoring tools or file backups.<\/p><p>Some background processes function as <a href=\"\/my\/tutorials\/manage-and-list-services-in-linux\">list services<\/a> &ndash; long-running tasks like web servers or network services that ensure continuous operation. Services are typically managed using built-in tools like <strong>systemctl<\/strong> instead of the commands we&rsquo;ll cover in the next section.<\/p><p>Keeping track of both foreground and background processes lets you identify resource-intensive programs and prevent slowdowns or even crashes that may result from mismanaged system resources.<\/p><h2 class=\"wp-block-heading\" id=\"h-listing-processes-in-linux\">Listing processes in Linux<\/h2><p>To list processes in Linux, use one of the five commands: <strong>ps<\/strong>, <strong>top<\/strong>, <strong>htop<\/strong>, <strong>atop<\/strong>, and <strong>pstree<\/strong>. Each command offers different detail and output formats. For instance, <strong>ps<\/strong> provides a momentary view of all processes, while <strong>top<\/strong> and <strong>htop<\/strong> dynamically sort them by CPU usage.<\/p><p>First, access your Linux system by opening a terminal or using an SSH client like PuTTY for a remote connection. For<a href=\"\/my\/vps-hosting\"> Hostinger VPS<\/a> customers, our built-in <strong>Browser terminal <\/strong>offers a convenient way to interact with your server.<\/p><p>To use this feature, log in to your Hostinger account and go to <strong>VPS &rarr; Manage<\/strong>. Then, open the <strong>SSH access<\/strong> tab to view your credentials, hit the <strong>Browser terminal<\/strong> button, and enter your previously noted login details. You&rsquo;re now ready to run commands directly from the browser.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0564a47bd3\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"563\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/hpanel-vps-overview-browser-terminal-highlighted-1024x563.png\" alt=\"The Browser terminal button in Hostinger's VPS\" class=\"wp-image-117040\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/hpanel-vps-overview-browser-terminal-highlighted-1024x563.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/hpanel-vps-overview-browser-terminal-highlighted-300x165.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/hpanel-vps-overview-browser-terminal-highlighted-150x82.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/hpanel-vps-overview-browser-terminal-highlighted-768x422.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/hpanel-vps-overview-browser-terminal-highlighted-1536x844.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/hpanel-vps-overview-browser-terminal-highlighted-2048x1125.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a href=\"\/my\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner-1024x300.png\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner-300x88.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner-150x44.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2023\/02\/VPS-hosting-banner-768x225.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h3 class=\"wp-block-heading\" id=\"h-linux-ps-command\">Linux ps command<\/h3><p>The process status (<strong>ps<\/strong>) command is one of the most popular tools for listing running processes in Linux. It provides a static snapshot of all processes at a given moment. By default, <strong>ps<\/strong> only shows the current user and session processes.<\/p><p>However, adding options like <strong>aux<\/strong> gives you more detailed information, including processes from all users and those not associated with a terminal. Here&rsquo;s a breakdown of each option:<\/p><ul class=\"wp-block-list\">\n<li><strong>a<\/strong> &ndash; see processes from all users.<\/li>\n\n\n\n<li><strong>u<\/strong> &ndash; add more details like CPU, memory usage, and the process owner.<\/li>\n\n\n\n<li><strong>x<\/strong> &ndash; include processes not associated with a terminal, such as system services.<\/li>\n<\/ul><p>When executed, the <strong>ps aux<\/strong> command displays critical details such as the process identification number (PID), CPU and memory usage percentages, process start time, total CPU time used, and the command that launched the process.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0564a49788\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"573\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/terminal-ps-aux-1024x573.png\" alt=\"The ps aux command's output in the terminal\" class=\"wp-image-117041\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-1024x573.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-300x168.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-150x84.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-768x430.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-1536x859.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-2048x1146.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>For a hierarchical view of processes, the <strong>ps -axjf<\/strong> command displays parent and child relationships between processes, which helps analyze dependencies.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0564a4a22f\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"522\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/terminal-ps-axjf-1024x522.png\" alt=\"The ps -axjf command's output in the terminal\" class=\"wp-image-117042\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-axjf-1024x522.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-axjf-300x153.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-axjf-150x76.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-axjf-768x391.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-axjf-1536x783.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-axjf-2048x1044.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>You can also filter specific processes using <a href=\"\/my\/tutorials\/grep-command-in-linux-useful-examples\">grep<\/a> to narrow the output to a particular task. Here&rsquo;s an example:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ps aux | grep apache2<\/pre><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0564a4ac9c\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"154\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/terminal-ps-aux-grep-apache2-1024x154.png\" alt=\"The ps aux | grep apache2 command's output in the terminal\" class=\"wp-image-117043\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-grep-apache2-1024x154.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-grep-apache2-300x45.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-grep-apache2-150x23.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-grep-apache2-768x116.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-grep-apache2-1536x231.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-aux-grep-apache2-2048x308.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Similarly, the <strong>ps -C process_name<\/strong> command filters processes by name, displaying all instances of that process and any child processes it has spawned.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0564a4b62e\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" width=\"802\" height=\"316\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/terminal-ps-c-apache2.png\" alt=\"the ps -C apache2 command's output in the terminal\" class=\"wp-image-117044\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-c-apache2.png 802w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-c-apache2-300x118.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-c-apache2-150x59.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-ps-c-apache2-768x303.png 768w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>If you are a Hostinger user, you can also ask the <strong>Kodee AI assistant <\/strong>to check all the processes in your VPS. Ask it, &ldquo;List all processes in my Linux from all users, including those that are not associated with terminal, like services. Also include detailed information about them, including the process owner, CPU usage, and memory consumption.&rdquo;<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0564a4bfaa\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"396\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/10\/kodee-lists-all-processes-in-a-vps-1-1024x396.png\" alt=\"Kodee lists all processes in the user's VPS\" class=\"wp-image-124534\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2016\/10\/kodee-lists-all-processes-in-a-vps-1-1024x396.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2016\/10\/kodee-lists-all-processes-in-a-vps-1-300x116.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2016\/10\/kodee-lists-all-processes-in-a-vps-1-150x58.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2016\/10\/kodee-lists-all-processes-in-a-vps-1-768x297.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2016\/10\/kodee-lists-all-processes-in-a-vps-1.png 1460w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-linux-top-command\">Linux top command<\/h3><p>The <strong>top<\/strong> command is a real-time dynamic process viewer that lets you monitor system performance. Unlike the static <strong>ps<\/strong> command, <strong>top<\/strong> continuously updates, providing an ongoing view of resource usage, including CPU and memory consumption.<\/p><p>The real-time nature of <strong>top<\/strong> makes it particularly useful for identifying currently running processes. By default, it sorts processes by CPU usage, with the most resource-intensive ones listed at the top.<\/p><p>To see this command in action, type <strong>top<\/strong> in your terminal. You&rsquo;ll then see an output similar to the following:<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0564a4cab7\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"698\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/terminal-top-1024x698.png\" alt=\"The top command's output in the terminal\" class=\"wp-image-117045\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-top-1024x698.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-top-300x204.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-top-150x102.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-top-768x523.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-top-1536x1046.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-top-2048x1395.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>In addition to monitoring, you can interact with the process list using various keyboard shortcuts, including:<\/p><ul class=\"wp-block-list\">\n<li><strong>k<\/strong> &ndash; terminate a process.<\/li>\n\n\n\n<li><strong>r<\/strong> &ndash; adjust the priority of a process.<\/li>\n\n\n\n<li><strong>m <\/strong>&ndash; sort processes by memory usage.<\/li>\n\n\n\n<li><strong>n <\/strong>&ndash;<strong> <\/strong>sort processes by PID.<\/li>\n\n\n\n<li><strong>d<\/strong> &ndash; change the refresh time interval.<\/li>\n\n\n\n<li><strong>h<\/strong> &ndash; see the help window.<\/li>\n\n\n\n<li><strong>c<\/strong> &ndash; see the absolute path of a process.<\/li>\n\n\n\n<li><strong>z<\/strong> &ndash; enable color display for better visualization of active processes.<\/li>\n<\/ul><p>Remember that the <strong>keys above are case-sensitive<\/strong>, so be sure to disable caps lock. To exit the <strong>top<\/strong> command, press <strong>q<\/strong>.<\/p><h3 class=\"wp-block-heading\" id=\"h-linux-htop-command\">Linux htop command<\/h3><p>The <strong>htop<\/strong> command is a more interactive, user-friendly alternative to <strong>top<\/strong>. It provides a visually appealing and intuitive interface for monitoring system performance and managing running processes.<\/p><p>With <strong>htop<\/strong>, you can scroll vertically and horizontally to view the full list of processes and their complete command lines.<\/p><p>Additionally, this command has mouse support, making it easier to navigate, select, and terminate processes without manually entering PIDs. You can also adjust the priority of multiple processes with just a few clicks.<\/p><p>Since most <a href=\"\/my\/tutorials\/best-linux-distro\">Linux distributions<\/a><strong> <\/strong>don&rsquo;t include <strong>htop<\/strong> by default, you&rsquo;ll need to install it manually. On Debian-based distros like Ubuntu, you can do so by running the following command:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install htop<\/pre><p>Meanwhile, for RHEL-based distros like CentOS, execute this command instead:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo dnf install htop<\/pre><p>Once installed, launch the command by typing <strong>htop<\/strong>. You&rsquo;ll then see a list of processes displayed in a more user-friendly format compared to <strong>top<\/strong>.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0564a4d941\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"526\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/terminal-htop-1024x526.png\" alt=\"The htop command's output in the terminal\" class=\"wp-image-117046\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-htop-1024x526.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-htop-300x154.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-htop-150x77.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-htop-768x394.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-htop-1536x788.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-htop-2048x1051.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p><strong>htop<\/strong> also offers various keyboard shortcuts for easier process management:<\/p><ul class=\"wp-block-list\">\n<li><strong>F1<\/strong> &ndash; display the help menu.<\/li>\n\n\n\n<li><strong>F2<\/strong> &ndash; open the setup menu.<\/li>\n\n\n\n<li><strong>F3<\/strong> &ndash; search for a process.<\/li>\n\n\n\n<li><strong>F4<\/strong> &ndash; filter processes by name.<\/li>\n\n\n\n<li><strong>F5<\/strong> &ndash; display processes in a tree view.<\/li>\n\n\n\n<li><strong>F6<\/strong> &ndash; sort processes by any column.<\/li>\n\n\n\n<li><strong>F7<\/strong> &ndash; decrease the process priority.<\/li>\n\n\n\n<li><strong>F8<\/strong> &ndash; increase the process priority.<\/li>\n\n\n\n<li><strong>F9<\/strong> &ndash; terminate a process.<\/li>\n\n\n\n<li><strong>F10<\/strong> &ndash; quit from <strong>htop<\/strong>.<\/li>\n<\/ul><h3 class=\"wp-block-heading\" id=\"h-linux-atop-command\">Linux atop command<\/h3><p>The <strong>atop<\/strong> command is a detailed process monitor that provides real-time information and historical logging for long-term analysis. Unlike <strong>top<\/strong> and <strong>htop<\/strong>, which focus primarily on real-time monitoring, <strong>atop<\/strong> offers additional insights through its logging capabilities.<\/p><p>One of the key advantages of <strong>atop<\/strong> is its ability to log and monitor system processes over an extended period &ndash; up to <strong>28<\/strong> days by default. This includes completed or terminated processes, allowing for in-depth performance analysis.<\/p><p>You can install <strong>atop<\/strong> using one of these commands, depending on your Linux distribution:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install atop&nbsp; # Ubuntu or Debian&nbsp;&nbsp;<\/pre><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo dnf install atop&nbsp; # CentOS, RHEL, or Fedora<\/pre><p>Once launched, <strong>atop<\/strong> displays resource usage for CPU, memory, swap, disks, and network at <strong>10<\/strong>-second intervals.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0564a4e6a7\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1024\" height=\"631\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/terminal-atop-1024x631.png\" alt=\"The atop command's output in the terminal\" class=\"wp-image-117047\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-atop-1024x631.png 1024w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-atop-300x185.png 300w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-atop-150x93.png 150w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-atop-768x474.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-atop-1536x947.png 1536w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-atop-2048x1263.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>The command also supports several options for more specific insights:<\/p><ul class=\"wp-block-list\">\n<li><strong>-i <\/strong>&ndash; average-per-second total values.<\/li>\n\n\n\n<li><strong>-a<\/strong> &ndash; active processes during the last intervals.<\/li>\n\n\n\n<li><strong>-c<\/strong> &ndash; the command line for each process.<\/li>\n\n\n\n<li><strong>-m<\/strong> &ndash; memory-related information.<\/li>\n\n\n\n<li><strong>-d<\/strong> &ndash; disk-related information.<\/li>\n\n\n\n<li><strong>-n<\/strong> &ndash; network activity.<\/li>\n\n\n\n<li><strong>-s<\/strong> &ndash; scheduling details.<\/li>\n\n\n\n<li><strong>-v<\/strong> &ndash; out various process data, such as PPID and user information.<\/li>\n\n\n\n<li><strong>-y<\/strong> &ndash; individual thread information.<\/li>\n<\/ul><p>While using <strong>atop<\/strong>, you can sort processes by specific resources using the following shortcut keys:<\/p><ul class=\"wp-block-list\">\n<li><strong>a<\/strong> &ndash; the most active resources.<\/li>\n\n\n\n<li><strong>c<\/strong> &ndash; CPU usage.<\/li>\n\n\n\n<li><strong>d<\/strong> &ndash; disk activity.<\/li>\n\n\n\n<li><strong>m<\/strong> &ndash; memory usage.<\/li>\n\n\n\n<li><strong>n<\/strong> &ndash; network activity.<\/li>\n<\/ul><h3 class=\"wp-block-heading\" id=\"h-linux-pstree-command\">Linux pstree command<\/h3><p>The <strong>pstree<\/strong> command helps visualize the process hierarchy in Linux. Instead of listing processes in a flat format like <strong>ps<\/strong> or <strong>top<\/strong>, <strong>pstree<\/strong> organizes them into a tree structure that displays parent-child relationships between processes.<\/p><p>This hierarchy makes it easier to understand how processes are related. For example, system services that launch other processes will appear at the top of the tree, with their child processes indented underneath.<\/p><p>Like <strong>htop<\/strong> and <strong>atop<\/strong>, <strong>pstree<\/strong> isn&rsquo;t always preinstalled on every distribution. You can install it with:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install psmisc&nbsp; # Ubuntu or Debian&nbsp;&nbsp;<\/pre><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo dnf install psmisc&nbsp; # CentOS, RHEL, or Fedora<\/pre><p>After installation, run <strong>pstree<\/strong> to visualize the process tree. Here&rsquo;s the expected output:<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0564a4f453\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"926\" height=\"1024\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2024\/10\/terminal-pstree-926x1024.png\" alt=\"The pstree command's output in the terminal\" class=\"wp-image-117048\" srcset=\"https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-pstree-926x1024.png 926w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-pstree-271x300.png 271w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-pstree-136x150.png 136w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-pstree-768x849.png 768w, https:\/\/www.hostinger.com\/my\/tutorials\/wp-content\/uploads\/sites\/45\/2024\/10\/terminal-pstree.png 1040w\" sizes=\"(max-width: 926px) 100vw, 926px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>You can use various options with <strong>pstree<\/strong> to see additional details:<\/p><ul class=\"wp-block-list\">\n<li><strong>-p<\/strong> &ndash; process IDs alongside each process name.<\/li>\n\n\n\n<li><strong>-u<\/strong> &ndash; usernames of the processes&rsquo; owners.<\/li>\n\n\n\n<li><strong>-h<\/strong> &ndash; currently running process for easier identification.<\/li>\n\n\n\n<li><strong>-a<\/strong> &ndash; full command lines, giving more context for each process.<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-managing-processes-in-linux\">Managing processes in Linux<\/h2><p>After identifying active Linux processes, the next step is to manage them effectively. This includes stopping, killing, or adjusting the priority of processes to maintain optimal system performance.<\/p><p>To stop or pause processes, you can run the <strong>jobs<\/strong> command to list background tasks and bring them back to the foreground if needed. For example, use <strong>fg<\/strong> to bring a task to the foreground, where <strong>&lt;job_number&gt;<\/strong> refers to the number of the background task:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">jobs\n\nfg &lt;job_number&gt;<\/pre><p>To <a href=\"\/my\/tutorials\/how-to-kill-a-process-in-linux\">terminate a process<\/a>, use the <strong>kill<\/strong> command and specify the PID. For instance:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">kill &lt;PID&gt;<\/pre><p>If you want to stop all processes with the same name, execute <strong>killall <\/strong>instead:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">killall process_name<\/pre><p>For finer control over system performance, you can adjust process priority using the renice command, which changes a running process&rsquo; priority value. Lowering this value gives a process higher CPU priority, while increasing it reduces the priority.<\/p><p>The basic syntax is as follows, where <strong>&lt;priority&gt;<\/strong> is the new value assigned to the process:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">renice &lt;priority&gt; &lt;PID&gt;<\/pre><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Monitoring Linux processes is essential for maintaining system health and optimizing performance. In this article, we&rsquo;ve explored commands like <strong>ps<\/strong>, <strong>top<\/strong>, <strong>htop<\/strong>, <strong>atop<\/strong>, and <strong>pstree<\/strong>, which help you list and monitor running processes.<\/p><p>By using these commands, you can ensure that your system remains efficient and responsive. Additionally, make regular process monitoring part of your routine to address any potential issues quickly.<\/p><p>If you still have questions or want to share additional tips for process management, feel free to leave a comment below.<\/p><h2 class=\"wp-block-heading\" id=\"h-list-linux-processes-faq\">List Linux processes FAQ<\/h2><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1727971997098\"><h3 class=\"schema-faq-question\">What command lists processes in Linux?<\/h3> <p class=\"schema-faq-answer\">You can list processes in Linux using commands like <strong>ps<\/strong>, <strong>top<\/strong>, <strong>htop<\/strong>, <strong>atop<\/strong>, and <strong>pstree<\/strong>. Each provides a different output format, from static snapshots (<strong>ps<\/strong>) and real-time monitoring (<strong>top<\/strong> and <strong>htop<\/strong>) to historical logging (<strong>atop<\/strong>) and process hierarchy views (<strong>pstree<\/strong>).<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1727972002905\"><h3 class=\"schema-faq-question\">How do I see all running processes?<\/h3> <p class=\"schema-faq-answer\">To see all running processes, use the <strong>ps aux<\/strong> command, which lists processes from all users. Alternatively, use the <strong>top<\/strong> or <strong>htop<\/strong> commands for a real-time view of process activity, including memory and CPU usage.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1727972009221\"><h3 class=\"schema-faq-question\">How do I check memory usage per process in Linux?<\/h3> <p class=\"schema-faq-answer\">Use the <strong>top<\/strong> or <strong>htop<\/strong> commands to view the memory usage percentage for each process as it happens. You can also run<strong> ps aux &ndash;sort=-%mem<\/strong> to list processes sorted by memory consumption.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>In Linux, processes are instances of running programs or commands. A single application can run multiple processes to handle different tasks. For example, a web browser creates separate processes for each open tab. Listing these processes helps you maintain a healthy Linux system by identifying resource-hungry tasks and detecting potential bottlenecks. This article will guide [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/my\/tutorials\/how-to-list-processes-in-linux\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":411,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to check and list running processes in Linux","rank_math_description":"To list processes in Linux, use one of the five commands: ps, top, htop, atop, and pstree. Check our article to learn how to manage processes.","rank_math_focus_keyword":"list processes linux","footnotes":""},"categories":[],"tags":[],"class_list":["post-682","post","type-post","status-publish","format-standard","hentry"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-list-processes-in-linux","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/como-listar-processos-linux","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/gerer-processus-linux-ligne-commande","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/ver-procesos-en-linux","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/manajemen-proses-linux-dengan-command-line","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-list-processes-in-linux","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-list-processes-in-linux","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-list-processes-in-linux","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/ver-procesos-en-linux","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/ver-procesos-en-linux","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/ver-procesos-en-linux","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/como-listar-processos-linux","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-list-processes-in-linux","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-list-processes-in-linux","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-list-processes-in-linux","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-list-processes-in-linux","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/users\/411"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/comments?post=682"}],"version-history":[{"count":37,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/682\/revisions"}],"predecessor-version":[{"id":124535,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/posts\/682\/revisions\/124535"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/media?parent=682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/categories?post=682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/my\/tutorials\/wp-json\/wp\/v2\/tags?post=682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}