{"id":501825,"date":"2022-10-18T19:00:28","date_gmt":"2022-10-18T16:00:28","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-list-linux-services-with-systemctl\/"},"modified":"2022-10-18T19:00:28","modified_gmt":"2022-10-18T16:00:28","slug":"how-to-list-linux-services-with-systemctl","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-list-linux-services-with-systemctl\/","title":{"rendered":"#How to List Linux Services With systemctl"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a29c3384fe58\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a29c3384fe58\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-list-linux-services-with-systemctl\/#%E2%80%9CHow_to_List_Linux_Services_With_systemctl%E2%80%9D\" >&#8220;How to List Linux Services With systemctl&#8221;<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-list-linux-services-with-systemctl\/#Services_and_Daemons\" >Services and Daemons<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-list-linux-services-with-systemctl\/#init_Or_systemd_Based\" >init Or systemd Based?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-list-linux-services-with-systemctl\/#Using_systemctl_To_List_Services\" >Using systemctl To List Services<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-list-linux-services-with-systemctl\/#Using_systemctl_To_List_Unit_Files\" >Using systemctl To List Unit Files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-list-linux-services-with-systemctl\/#Looking_at_One_Service_in_Detail\" >Looking at One Service in Detail<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-list-linux-services-with-systemctl\/#The_Autonomic_Systems\" >The Autonomic Systems<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"%E2%80%9CHow_to_List_Linux_Services_With_systemctl%E2%80%9D\"><\/span>&#8220;How to List Linux Services With systemctl&#8221;<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<div>\n<figure style=\"width: 1200px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage size-full wp-image-791996\" data-pagespeed-no-defer=\"\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/03\/shutterstock_321627716.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Linux laptop showing a bash prompt\" width=\"1200\" height=\"675\"\/><figcaption class=\"wp-caption-text\"><span class=\"type:primaryImage imagecredit\"><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.shutterstock.com\/image-vector\/linux-interface-screen-notebook-world-map-321627716\">fatmawati achmad zaenuri\/Shutterstock.com<\/a><\/span><\/figcaption><\/figure>\n<p>To see all running services on a Linux system with systemd, use the command &#8220;systemctl &#8211;type=service &#8211;state=running&#8221;.\u00a0This will show you each active service&#8217;s name, load, sub-state, and de<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">script<\/a>ion. You can also change the state value to see services that are dead, exited, failed, or inactive.<\/p>\n<p>Your Linux computer relies on a lot of background tasks called services or daemons. On systemd-based distributions you have built-in commands that let you see which services are running, disabled, or failed.<\/p>\n<h2 id=\"services-and-daemons\"><span class=\"ez-toc-section\" id=\"Services_and_Daemons\"><\/span>Services and Daemons<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Services and daemons are background tasks that run without a user interface, don\u2019t require human interaction, and are usually started as the computer boots up.<\/p>\n<p>At one time, services were launched by <code>init<\/code>, which was the very first process to be launched. The details of the services were held in a collection of scripts located in the \u201c\/etc\/init\/d\u201d directory. On non-systemd distributions that\u2019s still the case.<\/p>\n<p>In the systemd world, services are launched by <code>systemd<\/code> which is the now first process to be launched. The details of the services are stored in <em>unit files<\/em>\u00a0located in the \u201c\/usr\/lib\/systemd\u201d directory.<\/p>\n<p>According to its man page, <code>systemd<\/code> is a system and service manager. You can use the <code>systemctl<\/code> command to inspect and control different aspects of the systemd system, including services and daemons.<\/p>\n<p>Because we\u2019re looking at systemd-specific commands here, the first thing you need to know is whether you\u2019re running a systemd-based distribution or not.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>Why Linux&#8217;s systemd Is Still Divisive After All These Years<\/em><\/strong><\/p>\n<h2 id=\"init-or-systemd-based\"><span class=\"ez-toc-section\" id=\"init_Or_systemd_Based\"><\/span>init Or systemd Based?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The vast majority of Linux distributions use systemd, including Arch, Red Hat, and Debian, and many of the distributions derived from them. That includes the Ubuntu family of distributions, Fedora and its spins, and Manjaro and the other Arch-based distributions.<\/p>\n<p>However, there are forks or flavors of some of these distributions that have been created specifically to avoid having to use systemd. Not only that, but there are other init systems that someone could choose to use instead of the one that came by default in their distribution, such as\u00a0<a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/smarden.org\/runit\/\">runit<\/a>\u00a0or\u00a0<a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/skarnet.org\/software\/s6-linux-init\/\">s6-linux-init<\/a>.<\/p>\n<p>If you have to administer a Linux computer that you didn\u2019t set up yourself, the only way to be certain if it is using systemd or not, is to check. We can do that by looking at the process tree with the <code>pstree<\/code> command. We only need to see the very top of the tree\u2014we\u2019re looking for the very first process that runs, after all\u2014so we\u2019ll pipe the output through the <code>head<\/code> command, and ask for the first five entries.<\/p>\n<pre>pstree | head -5<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839291\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/1-3.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using pstree piped through head to determine if a Linux installation is using systemd\" width=\"644\" height=\"170\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>We can see that <code>systemd<\/code> is the first process that is run after boot, so we\u2019re definitely on a systemd-based installation of Linux.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>How to Manage Processes from the Linux Terminal: 10 Commands You Need to Know<\/em><\/strong><\/p>\n<h2 id=\"using-systemctl-to-list-services\"><span class=\"ez-toc-section\" id=\"Using_systemctl_To_List_Services\"><\/span>Using systemctl To List Services<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The command to list services and daemons is <code>systemctl<\/code>. We can refine the <code>systemctl<\/code> command with the <code>type<\/code> and <code>state<\/code> options. We\u2019re asking <code>systemctl<\/code> to report on services that are in the running state.<\/p>\n<pre>systemctl --type=service --state=running<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839293\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/2-3.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using systemctl to list running services\" width=\"644\" height=\"55\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>A table of information is generated. If it is too wide or long for your terminal window it is displayed in your default file viewer, which is likely going to be <code>less<\/code>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839294\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/3-4.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The output from a systemctl call displayed in the less file viewer\" width=\"644\" height=\"380\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>To see the right-hand end of the table press the Right Arrow key. To return to the usual view, press the Left Arrow key.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839295\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/4-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The right-hand section of output from a systemctl call displayed in the less file viewer\" width=\"644\" height=\"380\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Press the Q key to exit from less. The columns that are displayed are:<\/p>\n<ul>\n<li><strong>Unit<\/strong>: The name of the service or daemon. The column is titled \u201cUnit\u201d because whatever is in this column was launched using information <code>systemd<\/code> found in a unit file.<\/li>\n<li><strong>Load<\/strong>: The load state of the service or daemon. It can be loaded, not-found, bad-setting, error, or masked.<\/li>\n<li><strong>Active<\/strong>: The overall state the service or daemon is in. It can be active, reloading, inactive, failed, activating, or deactivating.<\/li>\n<li><strong>SUB<\/strong>: The sub-state of the service or daemon. It can be dead, exited, failed, inactive, or running.<\/li>\n<li><strong>Description<\/strong>: A short description of the unit.<\/li>\n<\/ul>\n<p>We can pipe the output of <code>systemctl<\/code> through <code>grep<\/code> if we want to focus on a single service. This command isolates the table entry for the <code>ssh<\/code> service.<\/p>\n<pre>systemctl --type=service --state=running | grep ssh<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839297\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/5-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using grep to isolate a single service from the results\" width=\"644\" height=\"130\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>So far, we\u2019ve been filtering the contents of the table by providing the <code>state=running<\/code> option. We can use any of the possible values of the sub-state instead: dead, exited, failed, inactive, or running.<\/p>\n<p>Let\u2019s look for failed services:<\/p>\n<pre>systemctl --type=service --state=failed<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839300\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/6-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Reporting on failed services with systemctl\" width=\"644\" height=\"208\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Combinations of sub-states can be used. Type them as a comma-separated list. Make sure you don\u2019t include any whitespace between the options. Note that this finds services that match <em>either<\/em> state.<\/p>\n<pre>systemctl --type=service --state=failed,exited<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839303\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/7-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Looking for services that have either failed or exited with systemctl\" width=\"644\" height=\"55\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Pressing the Right Arrow key to look at the off-screen columns show that we have a mixture of exited and failed services in the list.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839304\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/8-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"A mixture of failed and exited services found by systemctl\" width=\"644\" height=\"380\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>By default, <code>systemctl<\/code>\u00a0lists\u00a0processes\u2014services and daemons\u2014that have been launched by <code>systemd<\/code> because <code>systemd<\/code> found a unit file that contained a valid unit file for them. That\u2019s why the shorthand term for all of these process is \u201cunits.\u201d<\/p>\n<p>There is an option to explicitly request <code>systemctl<\/code> to list units, but as it is the default action, it isn\u2019t often used.<\/p>\n<p>These commands produce the same results.<\/p>\n<pre>sudo systemctl list-units --type=service --state=running<\/pre>\n<pre>sudo systemctl --type=service --state=running<\/pre>\n<h2 id=\"using-systemctl-to-list-unit-files\"><span class=\"ez-toc-section\" id=\"Using_systemctl_To_List_Unit_Files\"><\/span>Using systemctl To List Unit Files<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>We can expand the scope of the <code>systemctl<\/code> command by including the <code>list-unit-files<\/code> option. This doesn\u2019t just report on services and daemons that have been launched, it also lists all the\u00a0<em>unit files<\/em>\u00a0installed on your computer.<\/p>\n<pre>systemctl list-unit-files --state=enabled<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839306\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/9-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Listing unit files with systemctl\" width=\"644\" height=\"55\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>A colored table is displayed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839308\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/10-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"A list of unit files generated by systemctl, displayed in the less file browser\" width=\"644\" height=\"380\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Removing the <code>state<\/code> option removes the filtering. The output will contain all installed unit files, regardless of their state.<\/p>\n<pre>systemctl list-unit-files<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839309\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/11-2.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using systemctl to list unit files with no filtering\" width=\"644\" height=\"55\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The output will contain many more entries than the results from the previous commands.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839310\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/12-1.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"All the unit files listed by systemctl and displayed in the less file browser\" width=\"644\" height=\"381\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>On our test computer the results list is almost four times longer than the output of our previous commands.<\/p>\n<p>If you do want to use the <code>state<\/code> option, you can use multiple states with it as we saw earlier. The same rules apply. Provide the options as comma separated values and don\u2019t include any whitespace.<\/p>\n<p>This command will list all unit files that are either disabled or failed to launch.<\/p>\n<pre>systemctl list-unit-files --state=enabled,failed<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839312\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/13.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Using systemctl to look for unit files that match either of two states\" width=\"644\" height=\"55\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>A reduced number of results is shown, filtered according to the selections you made with the state option.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839313\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/14.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"A mixture of disabled and failed unit files found by systemctl\" width=\"644\" height=\"380\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"looking-at-one-service-in-detail\"><span class=\"ez-toc-section\" id=\"Looking_at_One_Service_in_Detail\"><\/span>Looking at One Service in Detail<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If something about one service or daemon piques your interest and deserves a deeper dive, you can look at it in detail using the systemctl status option.<\/p>\n<p>Let\u2019s have a look at the SSH daemon, sshd. All we need to do is use the status option and the name of the service or daemon.<\/p>\n<pre>systemctl status sshd<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-839314\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/10\/15.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"The details of a single service displayed by systemctl\" width=\"644\" height=\"355\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>This compact display shows:<\/p>\n<ul>\n<li>The name of the service together with a short description. A color-coded dot shows whether it is running or not. Green means it is running, red means it isn\u2019t.<\/li>\n<li>What was loaded, including the path to the unit file.<\/li>\n<li>How long it has been running.<\/li>\n<li>Where the documentation is located in the <code>man<\/code> manual.<\/li>\n<li>The Process ID of the running instance.<\/li>\n<li>How many concurrent instances of this service are running. Usually this will be one.<\/li>\n<li>How much memory is being consumed.<\/li>\n<li>How much CPU time has been consumed.<\/li>\n<li>The control group the service belongs to.<\/li>\n<\/ul>\n<p>Relevant entries from the system log are also shown. These are typically events such as the startup of the service. These can be informative if you\u2019re looking into a service or daemon that didn\u2019t launch correctly.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>How to Use journalctl to Read Linux System Logs<\/em><\/strong><\/p>\n<h2 id=\"wrap-up\"><span class=\"ez-toc-section\" id=\"The_Autonomic_Systems\"><\/span>The Autonomic Systems<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Services and daemons provide a lot of the automatic actions of your operating system, so they\u2019re vital. That means their health is vital too.<\/p>\n<p>Getting a view on your services, daemons, and unit files is easy, and informative. It\u2019s also a valuable troubleshooting step if a service or daemon refuses to start.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>How to Solve the &#8220;Too Many Open Files&#8221; Error on Linux<\/em><\/strong><\/p>\n<\/div>\n<p><script>\n setTimeout(function(){\n  !function(f,b,e,v,n,t,s)\n  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n  n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n  n.queue=[];t=b.createElement(e);t.async=!0;\n  t.src=v;s=b.getElementsByTagName(e)[0];\n  s.parentNode.insertBefore(t,s) } (window, document,'script',\n  'https:\/\/connect.facebook.net\/en_US\/fbevents.js');\n   fbq('init', '335401813750447');\n   fbq('track', 'PageView');\n  },3000);\n<\/script><\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.howtogeek.com\/839285\/how-to-list-linux-services-with-systemctl\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;How to List Linux Services With systemctl&#8221; fatmawati achmad zaenuri\/Shutterstock.com To see all running services on a Linux system with systemd, use the command &#8220;systemctl &#8211;type=service &#8211;state=running&#8221;.\u00a0This will show you each active service&#8217;s name, load, sub-state, and description. You can also change the state value to see services that are dead, exited, failed, or inactive&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":501826,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/03\/shutterstock_321627716.png?height=200p&trim=2,2,2,2","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-501825","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/501825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=501825"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/501825\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/501826"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=501825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=501825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=501825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}