You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The <code>ps</code> command is used to identify programs and processes that are running on the system and the resources they are using.
4281
-
Its frequently <a href="https://en.wikipedia.org/wiki/Pipeline_(Unix)">pipelined</a> with other commands like <code>grep</code> to search for a program/process or <code>less</code>
4282
-
so that the user can analyze the output one page at a time.</p>
4283
-
<p>Let's say you have a program like openshot which is notorious for hogging system resources when exporting a video, and you want to close it, but the GUI has become unresponsive.</p>
4284
-
<h3>Example</h3>
4285
-
<ol>
4286
-
<li>You want to find the PID of openshot and kill it.</li>
4287
-
</ol>
4288
-
<pre><code class="language-xml hljs xml" data-lang="xml">ps aux | grep openshot
<p>The <code>ps</code> command (process status) is used to display information about running processes on a Linux system — such as their PID, memory usage, CPU time, and associated users.</p>
4281
+
<p>It’s often <strong>piped</strong> with commands like <code>grep</code> to search for a specific process or <code>less</code> to scroll through large outputs.</p>
4282
+
<h2>Why Use <code>ps</code></h2>
4283
+
<p>Imagine your system feels slow or an app becomes unresponsive — you can use <code>ps</code> to:</p>
4284
+
<ul>
4285
+
<li>Identify processes consuming high CPU/memory</li>
4286
+
<li>Find a program’s PID (Process ID)</li>
4287
+
<li>Kill or debug a stuck process</li>
4288
+
<li>Check who’s running what on a shared system</li>
<p>When run without any options, it's useless and will print: <code>CMD</code> - the executable processes/(program) running, their <code>PID</code> - process ID, <code>TTY</code> - terminal type and <code>Time</code> - How long the process has utilized the CPU or thread.</p>
4299
-
<h3>Common Option</h3>
4300
-
<p>If you are going to remember only one thing from this page let it be these three letter <code>aux</code>:
4301
-
<code>a</code> - which displays all processes running, including those being run by other users.
4302
-
<code>u</code> - which shows the effective user of a process, i.e. the person whose file access permissions are used by the process.
4303
-
<code>x</code> - which shows processes that do not have a <code>TTY</code> associated with them.</p>
4297
+
<p>Output:</p>
4298
+
<pre><code class="language- hljs " data-lang=""> PID TTY TIME CMD
4299
+
4587 pts/0 00:00:00 bash
4300
+
4621 pts/0 00:00:00 ps
4301
+
</code></pre>
4302
+
<h2>Essential Usage</h2>
4303
+
<p><strong>The one combo to remember:</strong> <code>ps aux</code></p>
4304
+
<ul>
4305
+
<li><code>a</code> = all processes (all users)</li>
4306
+
<li><code>u</code> = show user/owner info</li>
4307
+
<li><code>x</code> = include processes without terminals</li>
4308
+
</ul>
4309
+
<pre><code class="language- hljs " data-lang="">ps aux
4310
+
</code></pre>
4311
+
<p>Output example:</p>
4312
+
<pre><code class="language- hljs " data-lang="">USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
<p>Another useful command which give a realtime snapshot of the processes and the resources they are using about every ten seconds is <code>top</code>.</p>
4462
+
<h2>Related Tools</h2>
4463
+
<p>If you need <strong>real-time</strong> monitoring, use:</p>
<p><code>kill</code> command in Linux (located in /bin/kill), is a built-in command which is used to terminate processes manually. The <code>kill</code> command sends a signal to a process which terminates the process. If the user doesn’t specify any signal which is to be sent along with kill command then default <em>TERM</em> signal is sent that terminates the process.</p>
<p>The <strong><code>nmtui</code></strong> (Network Manager Text User Interface) command is a <strong>menu-driven tool</strong> for configuring network connections in Linux.<br />
21238
+
It provides a simple, text-based interface to manage network settings such as Wi-Fi, Ethernet, hostname, and more — without using complex command-line options.</p>
21239
+
<hr />
21240
+
<h3>🔹 What it Does</h3>
21241
+
<p><code>nmtui</code> allows you to:</p>
21242
+
<ul>
21243
+
<li>View and edit <strong>network connections</strong></li>
21244
+
<li><strong>Activate or deactivate</strong> interfaces</li>
21245
+
<li><strong>Set or change</strong> the system <strong>hostname</strong></li>
21246
+
<li>Connect to <strong>Wi-Fi networks</strong></li>
<p>It is especially useful on servers or systems <strong>without a graphical desktop environment</strong>.</p>
21250
+
<hr />
21251
+
<h3>🧠 Syntax</h3>
21252
+
<p>nmtui [OPTION]</p>
21253
+
<hr />
21254
+
<h3>🖥️ Examples</h3>
21255
+
<ol>
21256
+
<li>
21257
+
<p><strong>Open the main menu interface:</strong></p>
21258
+
<p>nmtui<br />
21259
+
Opens the main TUI (text user interface) window with options to <em>Edit a connection</em>, <em>Activate a connection</em>, or <em>Set system hostname</em>.</p>
21260
+
</li>
21261
+
<li>
21262
+
<p><strong>Directly edit a network connection:</strong></p>
21263
+
<p>nmtui edit<br />
21264
+
Lets you create, modify, or delete network connections (both Ethernet and Wi-Fi).</p>
21265
+
</li>
21266
+
<li>
21267
+
<p><strong>Directly activate or deactivate connections:</strong></p>
21268
+
<p>nmtui connect<br />
21269
+
Opens the <em>Activate a connection</em> menu where you can enable or disable network interfaces.</p>
21270
+
</li>
21271
+
<li>
21272
+
<p><strong>Set or change the system hostname:</strong></p>
21273
+
<p>nmtui hostname<br />
21274
+
Opens a dialog box to set your system’s hostname (used for identification on a network).</p>
21275
+
</li>
21276
+
<li>
21277
+
<p><strong>Connect directly to a specific Wi-Fi network:</strong></p>
21278
+
<p>nmtui connect "MyWiFiNetwork"<br />
21279
+
Connects to the specified Wi-Fi network if it exists in range.</p>
21280
+
</li>
21281
+
<li>
21282
+
<p><strong>Quit the interface:</strong><br />
21283
+
Simply use <strong>Tab → Quit</strong> or press <strong>Esc</strong>.</p>
<p>Congratulations! You've reached the end of the <strong>101 Linux Commands eBook</strong>. Throughout this journey, you've explored over 135 essential Linux commands that form the foundation of system administration, development, and everyday Linux usage.</p>
0 commit comments