<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.completenoobs.com/noobs/index.php?action=history&amp;feed=atom&amp;title=Ubuntu_24.04_Terminal_CLI_Processes_and_Services</id>
	<title>Ubuntu 24.04 Terminal CLI Processes and Services - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.completenoobs.com/noobs/index.php?action=history&amp;feed=atom&amp;title=Ubuntu_24.04_Terminal_CLI_Processes_and_Services"/>
	<link rel="alternate" type="text/html" href="https://www.completenoobs.com/noobs/index.php?title=Ubuntu_24.04_Terminal_CLI_Processes_and_Services&amp;action=history"/>
	<updated>2026-04-30T03:40:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.completenoobs.com/noobs/index.php?title=Ubuntu_24.04_Terminal_CLI_Processes_and_Services&amp;diff=489&amp;oldid=prev</id>
		<title>Test1: Created page with &quot;== Ubuntu 24.04 Processes and Services ==  Ubuntu 24.04 introduces updated tools and enhancements for managing processes and services. This guide covers how to monitor, control, and optimize processes and services on your Ubuntu 24.04 system, including practical examples like running applications in the background and managing system services with &lt;code&gt;systemd&lt;/code&gt;.  == Introduction ==  Processes and services are fundamental to the operation of any Linux system, inclu...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.completenoobs.com/noobs/index.php?title=Ubuntu_24.04_Terminal_CLI_Processes_and_Services&amp;diff=489&amp;oldid=prev"/>
		<updated>2025-03-19T20:37:54Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Ubuntu 24.04 Processes and Services ==  Ubuntu 24.04 introduces updated tools and enhancements for managing processes and services. This guide covers how to monitor, control, and optimize processes and services on your Ubuntu 24.04 system, including practical examples like running applications in the background and managing system services with &amp;lt;code&amp;gt;systemd&amp;lt;/code&amp;gt;.  == Introduction ==  Processes and services are fundamental to the operation of any Linux system, inclu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Ubuntu 24.04 Processes and Services ==&lt;br /&gt;
&lt;br /&gt;
Ubuntu 24.04 introduces updated tools and enhancements for managing processes and services. This guide covers how to monitor, control, and optimize processes and services on your Ubuntu 24.04 system, including practical examples like running applications in the background and managing system services with &amp;lt;code&amp;gt;systemd&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Processes and services are fundamental to the operation of any Linux system, including Ubuntu 24.04. A &amp;#039;&amp;#039;&amp;#039;process&amp;#039;&amp;#039;&amp;#039; is an instance of a running program, while a &amp;#039;&amp;#039;&amp;#039;service&amp;#039;&amp;#039;&amp;#039; is a background process that provides system functionality, often starting at boot. This page will guide you through understanding, managing, and troubleshooting processes and services in Ubuntu 24.04, with a focus on tools and features specific to this release.&lt;br /&gt;
&lt;br /&gt;
== Understanding Processes in Ubuntu 24.04 ==&lt;br /&gt;
&lt;br /&gt;
=== Process Basics ===&lt;br /&gt;
In Ubuntu 24.04, each process has a unique &amp;#039;&amp;#039;&amp;#039;Process ID (PID)&amp;#039;&amp;#039;&amp;#039; and exists in one of several states:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Running&amp;#039;&amp;#039;&amp;#039;: The process is executing or waiting to execute.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Sleeping&amp;#039;&amp;#039;&amp;#039;: The process is waiting for an event (e.g., user input).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Stopped&amp;#039;&amp;#039;&amp;#039;: The process is paused, often by user action.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Zombie&amp;#039;&amp;#039;&amp;#039;: The process has terminated but remains in the process table.&lt;br /&gt;
&lt;br /&gt;
Processes are hierarchical, with parent processes creating child processes. The root of this hierarchy is the &amp;#039;&amp;#039;&amp;#039;init&amp;#039;&amp;#039;&amp;#039; process (PID 1), managed by &amp;lt;code&amp;gt;systemd&amp;lt;/code&amp;gt; in Ubuntu 24.04.&lt;br /&gt;
&lt;br /&gt;
=== Tools for Process Management ===&lt;br /&gt;
Ubuntu 24.04 provides several tools to monitor and manage processes:&lt;br /&gt;
* &amp;lt;code&amp;gt;ps&amp;lt;/code&amp;gt;: Lists processes. Use &amp;lt;code&amp;gt;ps aux&amp;lt;/code&amp;gt; for a detailed view.&lt;br /&gt;
* &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt;: Displays real-time process information, sorted by CPU usage.&lt;br /&gt;
* &amp;lt;code&amp;gt;htop&amp;lt;/code&amp;gt;: An enhanced version of &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; with a user-friendly interface. Install it with &amp;lt;code&amp;gt;sudo apt install htop&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;pgrep&amp;lt;/code&amp;gt;: Finds processes by name or other attributes. For example, &amp;lt;code&amp;gt;pgrep -f keepassxc&amp;lt;/code&amp;gt; finds processes matching &amp;quot;keepassxc&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Ubuntu 24.04 also includes improvements in process scheduling and resource management, optimizing performance for both desktop and server environments.&lt;br /&gt;
&lt;br /&gt;
== Background and Foreground Processes ==&lt;br /&gt;
&lt;br /&gt;
Processes in Ubuntu 24.04 can run in the &amp;#039;&amp;#039;&amp;#039;foreground&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;background&amp;#039;&amp;#039;&amp;#039;. Understanding how to manage them is key to efficient multitasking in the terminal.&lt;br /&gt;
&lt;br /&gt;
=== Foreground Processes ===&lt;br /&gt;
Foreground processes run interactively in the terminal, blocking further commands until they complete or are paused. For example, launching &amp;lt;code&amp;gt;nano&amp;lt;/code&amp;gt; to edit a file ties up the terminal until you exit the editor.&lt;br /&gt;
&lt;br /&gt;
=== Background Processes ===&lt;br /&gt;
Background processes run independently of the terminal, allowing you to continue using it for other tasks. This is ideal for long-running applications like downloads or running a KeePassXC AppImage.&lt;br /&gt;
&lt;br /&gt;
=== Managing Background and Foreground Processes ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Starting a Process in the Background&amp;#039;&amp;#039;&amp;#039;: Add an ampersand (&amp;lt;code&amp;gt;&amp;amp;&amp;lt;/code&amp;gt;) to the command. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;./keepassxc.appimage &amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
This launches KeePassXC in the background, displaying a job number (e.g., &amp;lt;code&amp;gt;[1]&amp;lt;/code&amp;gt;) and PID (e.g., &amp;lt;code&amp;gt;12345&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Moving a Foreground Process to the Background&amp;#039;&amp;#039;&amp;#039;: If a process is already running in the foreground:&lt;br /&gt;
** Pause it with &amp;lt;code&amp;gt;Ctrl + Z&amp;lt;/code&amp;gt; (e.g., &amp;lt;code&amp;gt;[1]+ Stopped ./keepassxc.appimage&amp;lt;/code&amp;gt;).&lt;br /&gt;
** Resume it in the background with:&lt;br /&gt;
&amp;lt;pre&amp;gt;bg&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Checking Background Processes&amp;#039;&amp;#039;&amp;#039;: List all background jobs in the current terminal session:&lt;br /&gt;
&amp;lt;pre&amp;gt;jobs&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output might look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;[1]+  Running                 ./keepassxc.appimage &amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
To see all processes (including those not tied to the terminal), use:&lt;br /&gt;
&amp;lt;pre&amp;gt;ps aux | grep keepassxc&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bringing a Background Process to the Foreground&amp;#039;&amp;#039;&amp;#039;: Use the &amp;lt;code&amp;gt;fg&amp;lt;/code&amp;gt; command with the job number:&lt;br /&gt;
&amp;lt;pre&amp;gt;fg %1&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace &amp;lt;code&amp;gt;%1&amp;lt;/code&amp;gt; with the job number from the &amp;lt;code&amp;gt;jobs&amp;lt;/code&amp;gt; output.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Closing a Background Process&amp;#039;&amp;#039;&amp;#039;: To terminate a specific background process:&lt;br /&gt;
** Find its PID:&lt;br /&gt;
&amp;lt;pre&amp;gt;pgrep -f keepassxc.appimage&amp;lt;/pre&amp;gt;&lt;br /&gt;
This might return &amp;lt;code&amp;gt;12345&amp;lt;/code&amp;gt;.&lt;br /&gt;
** Kill it:&lt;br /&gt;
&amp;lt;pre&amp;gt;kill 12345&amp;lt;/pre&amp;gt;&lt;br /&gt;
Use &amp;lt;code&amp;gt;kill -9 12345&amp;lt;/code&amp;gt; if it doesn’t close gracefully.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Persistent Background Processes&amp;#039;&amp;#039;&amp;#039;: Closing the terminal ends background jobs. To keep them running, use &amp;lt;code&amp;gt;nohup&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;nohup ./keepassxc.appimage &amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or run them in a &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt; session.&lt;br /&gt;
&lt;br /&gt;
=== Example: Running KeePassXC in the Background ===&lt;br /&gt;
Let’s run a KeePassXC AppImage in the background, check it, and close it:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Start KeePassXC&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;./keepassxc.appimage &amp;amp;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output: &amp;lt;code&amp;gt;[1] 12345&amp;lt;/code&amp;gt;. KeePassXC runs, and the terminal is free.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Check Background Jobs&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;jobs&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output: &amp;lt;code&amp;gt;[1]+ Running ./keepassxc.appimage &amp;amp;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Verify with PID&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;pgrep -f keepassxc.appimage&amp;lt;/pre&amp;gt;&lt;br /&gt;
Output: &amp;lt;code&amp;gt;12345&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Close KeePassXC&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;kill 12345&amp;lt;/pre&amp;gt;&lt;br /&gt;
Verify it’s gone with &amp;lt;code&amp;gt;jobs&amp;lt;/code&amp;gt; (empty output) or &amp;lt;code&amp;gt;ps aux | grep keepassxc&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This approach lets you run KeePassXC without tying up your terminal, check its status, and stop it when needed.&lt;br /&gt;
&lt;br /&gt;
== System Services in Ubuntu 24.04 ==&lt;br /&gt;
&lt;br /&gt;
=== Systemd Overview ===&lt;br /&gt;
Ubuntu 24.04 uses &amp;lt;code&amp;gt;systemd&amp;lt;/code&amp;gt; as its default init system, managing system services and boot processes. &amp;lt;code&amp;gt;systemd&amp;lt;/code&amp;gt; provides better performance and advanced features compared to older init systems.&lt;br /&gt;
&lt;br /&gt;
=== Managing Services with systemctl ===&lt;br /&gt;
The &amp;lt;code&amp;gt;systemctl&amp;lt;/code&amp;gt; command is used to manage services. Common commands include:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Start a service&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;sudo systemctl start service_name&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Stop a service&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;sudo systemctl stop service_name&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Enable a service&amp;#039;&amp;#039;&amp;#039; (start at boot): &lt;br /&gt;
&amp;lt;pre&amp;gt;sudo systemctl enable service_name&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Disable a service&amp;#039;&amp;#039;&amp;#039; (don’t start at boot): &lt;br /&gt;
&amp;lt;pre&amp;gt;sudo systemctl disable service_name&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Check service status&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;systemctl status service_name&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Common Services in Ubuntu 24.04 ===&lt;br /&gt;
Some essential services include:&lt;br /&gt;
* &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt;: Allows secure remote access.&lt;br /&gt;
* &amp;lt;code&amp;gt;apache2&amp;lt;/code&amp;gt;: Serves web pages.&lt;br /&gt;
* &amp;lt;code&amp;gt;snapd&amp;lt;/code&amp;gt;: Manages Snap packages, a key feature in Ubuntu.&lt;br /&gt;
&lt;br /&gt;
=== Creating Custom Services ===&lt;br /&gt;
You can create your own services with &amp;lt;code&amp;gt;systemd&amp;lt;/code&amp;gt;. For example, to start the IPFS daemon at boot:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Create a service file&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;sudo nano /etc/systemd/system/ipfs.service&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Add the following content&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Start IPFS daemon&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=simple&lt;br /&gt;
ExecStart=/usr/local/bin/ipfs daemon&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=multi-user.target&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Enable and start the service&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;sudo systemctl enable ipfs.service&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo systemctl start ipfs&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Monitoring and Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Real-Time Monitoring ===&lt;br /&gt;
Use &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;htop&amp;lt;/code&amp;gt; to monitor processes in real-time:&lt;br /&gt;
* &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt;: Default tool, press &amp;lt;code&amp;gt;q&amp;lt;/code&amp;gt; to quit.&lt;br /&gt;
* &amp;lt;code&amp;gt;htop&amp;lt;/code&amp;gt;: More interactive, with color-coding and easier navigation.&lt;br /&gt;
&lt;br /&gt;
=== Viewing Logs ===&lt;br /&gt;
Use &amp;lt;code&amp;gt;journalctl&amp;lt;/code&amp;gt; to access service logs:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;View logs for a service&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;journalctl -u service_name&amp;lt;/pre&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Follow live logs&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&amp;lt;pre&amp;gt;journalctl -f&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Finding Process Issues ===&lt;br /&gt;
To identify resource-heavy processes:&lt;br /&gt;
* Use &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;htop&amp;lt;/code&amp;gt; and sort by CPU or memory usage.&lt;br /&gt;
* Alternatively, use &amp;lt;code&amp;gt;ps aux | sort -nk 3&amp;lt;/code&amp;gt; to sort by CPU usage.&lt;/div&gt;</summary>
		<author><name>Test1</name></author>
	</entry>
</feed>