{"id":1575,"date":"2022-07-10T21:27:00","date_gmt":"2022-07-11T03:27:00","guid":{"rendered":"http:\/\/www.supportpro.com\/blog\/?p=1575"},"modified":"2026-03-31T00:12:37","modified_gmt":"2026-03-31T06:12:37","slug":"process-status-ps","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/process-status-ps\/","title":{"rendered":"Linux ps Command : Process States &amp; Management"},"content":{"rendered":"\n<p>In Linux, everything running on the system is a <strong>process<\/strong>. Whether it&#8217;s a system service, background daemon, or user application, each runs in its own virtual address space.<\/p>\n\n\n\n<p>Since Linux is a <strong>multitasking operating system<\/strong>, multiple processes run simultaneously. Understanding how to monitor and manage these processes is a core skill for Linux administrators.<\/p>\n\n\n\n<p>This guide explains:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>What a process is in Linux<br><\/li>\n\n\n\n<li>Types of Linux processes<br><\/li>\n\n\n\n<li>Process state codes (R, S, Z, D, T)<br><\/li>\n\n\n\n<li>How to use the ps command<br><\/li>\n\n\n\n<li>How to interpret ps aux output<br><\/li>\n<\/ul>\n\n\n\n<p><strong>What Is a Process in Linux?<\/strong><\/p>\n\n\n\n<p>A <strong>process<\/strong> is a running instance of a program.<\/p>\n\n\n\n<p>When you execute a command, Linux:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Allocates memory<br><\/li>\n\n\n\n<li>Assigns a Process ID (PID)<br><\/li>\n\n\n\n<li>Creates a virtual address space<br><\/li>\n\n\n\n<li>Schedules CPU time<br><\/li>\n<\/ol>\n\n\n\n<p>Every active task in Linux &#8211; including system services operates as a process.<\/p>\n\n\n\n<p><strong>Types of Processes in Linux<\/strong><\/p>\n\n\n\n<p>Linux systems run several categories of processes:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Interactive Processes<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Started from a terminal (shell)<br><\/li>\n\n\n\n<li>Can run in foreground or background<br><\/li>\n\n\n\n<li>Controlled by the user<br><\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firefox &amp;<\/code><\/pre>\n\n\n\n<p><strong>2. Batch Processes<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Not linked to a terminal<br><\/li>\n\n\n\n<li>Executed automatically from a queue<br><\/li>\n\n\n\n<li>Often scheduled via cron<br><\/li>\n<\/ul>\n\n\n\n<p><strong>3. Daemon Processes<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Background services<br><\/li>\n\n\n\n<li>Start during system boot<br><\/li>\n\n\n\n<li>Run continuously<br><\/li>\n<\/ul>\n\n\n\n<p>Examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>sshd<br><\/li>\n\n\n\n<li>cron<br><\/li>\n\n\n\n<li>systemd<br><\/li>\n<\/ul>\n\n\n\n<p>Daemons typically have no associated terminal (TTY shows ?).<\/p>\n\n\n\n<p><strong>Linux Process States (STAT Codes Explained)<\/strong><\/p>\n\n\n\n<p>When using the ps command, the <strong>STAT<\/strong> column shows process state codes.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><div class=\"pcrstb-wrap\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Code<\/strong><\/td><td><strong>Meaning<\/strong><\/td><\/tr><tr><td><strong>R<\/strong><\/td><td>Running or ready to run<\/td><\/tr><tr><td><strong>S<\/strong><\/td><td>Interruptible sleep (waiting for event)<\/td><\/tr><tr><td><strong>D<\/strong><\/td><td>Uninterruptible sleep (usually I\/O wait)<\/td><\/tr><tr><td><strong>T<\/strong><\/td><td>Stopped (job control or tracing)<\/td><\/tr><tr><td><strong>Z<\/strong><\/td><td>Zombie (defunct process)<\/td><\/tr><tr><td><strong>X<\/strong><\/td><td>Dead (rarely seen)<\/td><\/tr><\/tbody><\/table><\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Key States Explained<\/strong><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>R \u2013 Running<\/strong><\/h3>\n\n\n\n<p>The process is currently executing or ready for CPU scheduling.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>S \u2013 Sleeping<\/strong><\/h3>\n\n\n\n<p>The process is idle, waiting for an event or signal.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>D \u2013 Uninterruptible Sleep<\/strong><\/h3>\n\n\n\n<p>Usually waiting on disk I\/O. Cannot be interrupted by signals.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Z \u2013 Zombie Process<\/strong><\/h3>\n\n\n\n<p>The process has finished execution but still exists in the process table because its parent hasn\u2019t collected its exit status.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Understanding the Linux ps Command<\/strong><\/h3>\n\n\n\n<p>The ps (process status) command displays information about active processes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Basic Usage<\/strong><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>ps<\/code><\/pre>\n\n\n\n<p>Shows processes associated with the current terminal session.<\/p>\n\n\n\n<p><strong>View All Processes<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ps aux<\/code><\/pre>\n\n\n\n<p>This is the most commonly used form.<\/p>\n\n\n\n<p><strong>Understanding ps aux Output<\/strong><\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ps aux<\/code><\/pre>\n\n\n\n<p>Output columns include:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><div class=\"pcrstb-wrap\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Column<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>USER<\/td><td>Process owner<\/td><\/tr><tr><td>PID<\/td><td>Process ID<\/td><\/tr><tr><td>%CPU<\/td><td>CPU usage<\/td><\/tr><tr><td>%MEM<\/td><td>Memory usage<\/td><\/tr><tr><td>VSZ<\/td><td>Virtual memory size<\/td><\/tr><tr><td>RSS<\/td><td>Resident memory size<\/td><\/tr><tr><td>TTY<\/td><td>Terminal associated<\/td><\/tr><tr><td>STAT<\/td><td>Process state<\/td><\/tr><tr><td>START<\/td><td>Start time<\/td><\/tr><tr><td>TIME<\/td><td>CPU time consumed<\/td><\/tr><tr><td>COMMAND<\/td><td>Executed command<\/td><\/tr><\/tbody><\/table><\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What Is a PID?<\/strong><\/h3>\n\n\n\n<p>A <strong>PID (Process ID)<\/strong> is a unique number assigned to each process.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Starts at 1 (usually init or systemd)<br><\/li>\n\n\n\n<li>Increments sequentially<br><\/li>\n\n\n\n<li>Reused after reaching system limit<br><\/li>\n<\/ul>\n\n\n\n<p>To terminate a process:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kill PID<\/code><\/pre>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kill 1234<\/code><\/pre>\n\n\n\n<p><strong>Understanding TTY Column<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Displays terminal from which process started<br><\/li>\n\n\n\n<li>? indicates daemon\/background process<br><\/li>\n\n\n\n<li>Useful for identifying interactive sessions<br><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What Is CPU TIME in ps Output?<\/strong><\/h3>\n\n\n\n<p>The TIME column shows:<\/p>\n\n\n\n<p>Total CPU time used by the process<\/p>\n\n\n\n<p>&nbsp;This is NOT the total runtime duration &#8211; only CPU usage time.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Login Shell Identification<\/strong><\/h3>\n\n\n\n<p>Login shells often appear with a hyphen:<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-bash<\/code><\/pre>\n\n\n\n<p>This indicates the original login shell.<\/p>\n\n\n\n<p>Additional shells started afterward will not have the hyphen.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Common Linux Process Management Commands<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><div class=\"pcrstb-wrap\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Command<\/strong><\/td><td><strong>Purpose<\/strong><\/td><\/tr><tr><td>ps<\/td><td>View running processes<\/td><\/tr><tr><td>top<\/td><td>Real-time process monitoring<\/td><\/tr><tr><td>htop<\/td><td>Enhanced process viewer<\/td><\/tr><tr><td>kill<\/td><td>Terminate process<\/td><\/tr><tr><td>kill -9<\/td><td>Force kill process<\/td><\/tr><tr><td>nice<\/td><td>Set process priority<\/td><\/tr><tr><td>renice<\/td><td>Modify priority of running process<\/td><\/tr><\/tbody><\/table><\/div><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>When to Use ps Command<\/strong><\/h3>\n\n\n\n<p>System administrators use ps to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Identify high CPU processes<br><\/li>\n\n\n\n<li>Detect zombie processes<br><\/li>\n\n\n\n<li>Monitor daemon activity<br><\/li>\n\n\n\n<li>Troubleshoot stuck tasks<br><\/li>\n\n\n\n<li>Investigate system performance<br><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Summary<\/strong><\/h3>\n\n\n\n<p>The Linux ps command is a fundamental tool for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Monitoring running processes<br><\/li>\n\n\n\n<li>Understanding process states<br><\/li>\n\n\n\n<li>Managing system resources<br><\/li>\n\n\n\n<li>Troubleshooting performance issues<br><\/li>\n<\/ul>\n\n\n\n<p>By understanding PID, STAT codes, and process types, administrators can efficiently manage Linux systems.<\/p>\n\n\n\n<p>If you&#8217;re managing production Linux servers and need expert assistance with process management, performance tuning, or troubleshooting, professional Linux server support can help maintain system stability and uptime.<\/p>\n\n\n\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin&nbsp;<\/a><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In Linux, everything running on the system is a process. Whether it&#8217;s a system service, background daemon, or user application, each runs in its own virtual address space. Since Linux&hellip;<\/p>\n","protected":false},"author":5,"featured_media":12856,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[5],"tags":[83],"class_list":["post-1575","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general-topics","tag-linux"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/1575","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=1575"}],"version-history":[{"count":9,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/1575\/revisions"}],"predecessor-version":[{"id":16681,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/1575\/revisions\/16681"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media\/12856"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=1575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=1575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=1575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}