{"id":16622,"date":"2019-04-08T11:11:10","date_gmt":"2019-04-08T11:11:10","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=16622"},"modified":"2026-03-09T19:19:36","modified_gmt":"2026-03-09T19:19:36","slug":"manage-and-list-services-in-linux","status":"publish","type":"post","link":"\/ng\/tutorials\/manage-and-list-services-in-linux\/","title":{"rendered":"How to use Linux list services to effectively manage running services"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>An operating system requires programs that run in the background called services. In a Linux system, these services are called daemons. They are managed using an init system like systemd.<\/p><p>System administrators must understand how to use Linux list services to efficiently manage and troubleshoot their servers. It helps ensure their virtual private server (VPS) hosting performs optimally and securely.<\/p><p>This article will explain how to use different init system commands in Linux to list services. You will also learn how to manage the services and other best practices for effective Linux system administration.<\/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\"><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"566\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=1024,h=1024,fit=scale-down\" alt=\"\" class=\"wp-image-69262\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=2048,fit=scale-down 2048w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure>\n<\/div><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-use-linux-list-services\">How to Use Linux List Services<\/h2><p>This section will explain different methods to list running services in Linux.<\/p><p>To run <a href=\"\/ng\/tutorials\/linux-commands\/\">Linux commands<\/a> in a remote server, connect using an SSH client or Terminal and log in as a root user.<\/p><p>        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Pro Tip                <\/p>\n            <\/div>\n            <p class=\"protip__content\">Hostinger VPS users can connect to their remote server and execute commands directly in hPanel using the <a href=\"https:\/\/support.hostinger.com\/en\/articles\/7978544-how-to-use-the-browser-terminal\">browser terminal<\/a>.<\/p>\n                    <\/div>\n        \n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-how-to-list-linux-services-with-systemctl\">How to List Linux Services with Systemctl<\/h3><p>Most modern Linux systems use <strong>systemd<\/strong> &ndash;<strong> <\/strong>an<strong> <\/strong>init<strong> <\/strong>system and service manager for controlling daemons. It is a drop-in replacement for older distributions&rsquo; init processes.<\/p><p>Systemd has the <strong>systemctl <\/strong>command, which lets users manage their system and service configurations. For example, use it to list all unit files in your Linux server:<\/p><pre class=\"wp-block-preformatted\">sudo systemctl list-unit-files --type service --all<\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-listing-all-unit-files.png\"><img loading=\"lazy\" decoding=\"async\" width=\"719\" height=\"179\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-listing-all-unit-files.png\/public\" alt=\"The systemctl command listing all unit files\" class=\"wp-image-93812\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-listing-all-unit-files.png\/w=719,fit=scale-down 719w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-listing-all-unit-files.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-listing-all-unit-files.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/a><\/figure><\/div><p>Terminal will list unit files with the <strong>service<\/strong> type in a tabular format, including their state and vendor preset.<\/p><p>Service state is the systemd units&rsquo; operational status. The most common ones are:<\/p><ul class=\"wp-block-list\">\n<li><strong>Enabled<\/strong> &ndash; active services running in the background.<\/li>\n\n\n\n<li><strong>Disabled <\/strong>&ndash; disabled services that users can enable directly using the <strong>start <\/strong>command.<\/li>\n\n\n\n<li><strong>Masked<\/strong> &ndash; stopped services that can only be started by removing the masked property.<\/li>\n\n\n\n<li><strong>Static <\/strong>&ndash; services that only run when another program or unit requires them.<\/li>\n\n\n\n<li><strong>Failed<\/strong> &ndash; inactive services that can&rsquo;t load or operate properly.<\/li>\n<\/ul><p>Meanwhile, the vendor preset is a service&rsquo;s default configuration, which determines whether it starts during the boot time or not. You can also use the systemctl <strong>list-units <\/strong>command to list properly loaded services:<\/p><pre class=\"wp-block-preformatted\">sudo systemctl list-units --type service --all<\/pre><p>A unit includes all processes in systemd, including system services, devices, and mounts. Use the <strong>&ndash;type <\/strong>flag to list only the <strong>service <\/strong>unit type.<\/p><p>        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Pro Tip                <\/p>\n            <\/div>\n            <p class=\"protip__content\">Unlike <strong>list-units<\/strong>, the <strong>systemctl list-unit-files<\/strong> command lists installed unit files or each systemd process&rsquo;s configuration. Since it shows all services regardless of their startup condition, listing unit files is more suitable for checking the installed daemons.<\/p>\n                    <\/div>\n        \n\n\n\n<\/p><p>You can combine systemctl with the <a href=\"\/ng\/tutorials\/grep-command-in-linux-useful-examples\/\"><strong>grep<\/strong> command<\/a> or <strong>&ndash;state<\/strong> option to filter a specific Linux service status. Here are the service filtering techniques:<\/p><pre class=\"wp-block-preformatted\">sudo systemctl list-unit-files --type service | grep status<\/pre><pre class=\"wp-block-preformatted\">sudo systemctl list-unit-files --type service &ndash;-state=status<\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returning-only-enabled-services.png\"><img loading=\"lazy\" decoding=\"async\" width=\"767\" height=\"163\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returning-only-enabled-services.png\/public\" alt=\"The systemctl command returning only enabled services\" class=\"wp-image-93813\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returning-only-enabled-services.png\/w=767,fit=scale-down 767w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returning-only-enabled-services.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returning-only-enabled-services.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 767px) 100vw, 767px\" \/><\/a><\/figure><\/div><p>Don&rsquo;t forget to replace <strong>status <\/strong>with your current unit file state. For example, use <strong>enabled <\/strong>to only list running services that are loaded properly. You can also filter units, but the status may differ:<\/p><pre class=\"wp-block-preformatted\">sudo systemctl list-units --type service &ndash;-state=status<\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returns-units-with-enabled-status.png\"><img loading=\"lazy\" decoding=\"async\" width=\"722\" height=\"322\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returns-units-with-enabled-status.png\/public\" alt=\"The systemctl command returns units with enabled status\" class=\"wp-image-93814\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returns-units-with-enabled-status.png\/w=722,fit=scale-down 722w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returns-units-with-enabled-status.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returns-units-with-enabled-status.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><\/a><\/figure><\/div><p>You can print only the last few lines by combining<strong> systemctl <\/strong>with the <a href=\"\/ng\/tutorials\/how-to-use-tail-command\/\"><strong>tail <\/strong>command.<\/a> For example, run the following to output the last 10 enabled services:<\/p><pre class=\"wp-block-preformatted\">sudo systemctl list-unit-files --type service &ndash;-state=enabled | tail<\/pre><h3 class=\"wp-block-heading\" id=\"h-how-to-list-services-on-linux-using-the-service-command\">How to List Services on Linux Using the Service Command<\/h3><p>Older Linux operating systems use a different service manager called<strong> System V<\/strong>. To manage services in this init system, use the <strong>service <\/strong>command.<\/p><p>For example, run the following to list all daemons:<\/p><pre class=\"wp-block-preformatted\">service --status-all<\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-service-command-listing-all-system-services-and-their-statuses.png\"><img loading=\"lazy\" decoding=\"async\" width=\"599\" height=\"197\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-service-command-listing-all-system-services-and-their-statuses.png\/public\" alt=\"The service command listing all system services and their statuses\" class=\"wp-image-93815\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-service-command-listing-all-system-services-and-their-statuses.png\/w=599,fit=scale-down 599w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-service-command-listing-all-system-services-and-their-statuses.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-service-command-listing-all-system-services-and-their-statuses.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/a><\/figure><\/div><p>The command will also show the services&rsquo; statuses using symbols. The symbols may differ depending on the Linux distribution. These are the most common ones:<\/p><ul class=\"wp-block-list\">\n<li>[+] &ndash; an active service.<\/li>\n\n\n\n<li>[-] &ndash; inactive or disabled services.<\/li>\n\n\n\n<li>[?] &ndash; the service&rsquo;s status is unknown.<\/li>\n<\/ul><p>Use the <strong>grep<\/strong> command to filter running services based on their status. For example, here&rsquo;s the command to list running services:<\/p><pre class=\"wp-block-preformatted\">sudo service --status-all | grep \"+\"<\/pre><p>Replace the<strong> +<\/strong> symbol to list unknown or inactive units. Note that services with unknown status may also be included when you filter running or disabled services.<\/p><p>You can determine the status of a specific service using its name:<\/p><pre class=\"wp-block-preformatted\">sudo service service-name status<\/pre><p>        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Pro Tip                <\/p>\n            <\/div>\n            <p class=\"protip__content\">Several distributions with systemd, like <strong>Debian 8.0<\/strong>, may also provide SysV as an alternative. This means you can list services using <strong>systemctl<\/strong> and <strong>service<\/strong>.<\/p>\n                    <\/div>\n        \n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-how-to-list-linux-services-with-service-management-tools\">How to List Linux Services With Service Management Tools<\/h3><p>Some <a href=\"\/ng\/tutorials\/best-linux-distro\/\">Linux distributions<\/a> and versions use alternate service management tools besides systemd and System V. A popular example is <strong>Upstart<\/strong>, included in Ubuntu 14.04, Fedora 9, Red Hat Linux Enterprise 6, and its derivatives.<\/p><p>To list all services with Upstart, use the <strong>initctl <\/strong>command:<\/p><pre class=\"wp-block-preformatted\">sudo initctl list<\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-initctl-command-listing-system-services-and-their-statuses.png\"><img loading=\"lazy\" decoding=\"async\" width=\"741\" height=\"336\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-initctl-command-listing-system-services-and-their-statuses.png\/public\" alt=\"The initctl command listing system services and their statuses\" class=\"wp-image-93816\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-initctl-command-listing-system-services-and-their-statuses.png\/w=741,fit=scale-down 741w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-initctl-command-listing-system-services-and-their-statuses.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-initctl-command-listing-system-services-and-their-statuses.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 741px) 100vw, 741px\" \/><\/a><\/figure><\/div><p>Terminal will list running instances with their identification ID and current status. Common service statuses in Upstart include:<\/p><ul class=\"wp-block-list\">\n<li><strong>Running<\/strong> &ndash; loaded services that are currently running.<\/li>\n\n\n\n<li><strong>Stopped<\/strong> &ndash; disabled services due to user command or by design.<\/li>\n\n\n\n<li><strong>Killed<\/strong> &ndash; unintentionally stopped services due to a <a href=\"\/ng\/tutorials\/how-to-kill-a-process-in-linux\/\">process interruption<\/a> or termination signal.<\/li>\n\n\n\n<li><strong>Starting<\/strong> &ndash; services that are about to run.<\/li>\n\n\n\n<li><strong>Waiting<\/strong> &ndash; instances that are waiting for a trigger event to start.<\/li>\n<\/ul><p>You can use <strong>grep<\/strong> to filter the service based on their status. The syntax is similar to the <strong>service <\/strong>or <strong>systemctl<\/strong> command:<\/p><pre class=\"wp-block-preformatted\">initctl list | grep running<\/pre><p>Other Linux distributions &ndash; including Gentoo, Funtoo, Alpine, and Hyperbola &ndash; use the <strong>OpenRC <\/strong>service manager.<\/p><p>To list services in an OpenRC system, use the <strong>rc-status<\/strong> command:<\/p><pre class=\"wp-block-preformatted\">rc-status<\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-rc-status-command-listing-system-services-and-their-statuses.png\"><img loading=\"lazy\" decoding=\"async\" width=\"722\" height=\"226\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-rc-status-command-listing-system-services-and-their-statuses.png\/public\" alt=\"The rc-status command listing system services and their statuses\" class=\"wp-image-93817\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-rc-status-command-listing-system-services-and-their-statuses.png\/w=722,fit=scale-down 722w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-rc-status-command-listing-system-services-and-their-statuses.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-rc-status-command-listing-system-services-and-their-statuses.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><\/a><\/figure><\/div><p>Depending on your distribution, the output may differ slightly. Commonly, it will show the system&rsquo;s current <a href=\"https:\/\/wiki.gentoo.org\/wiki\/OpenRC#Runlevels\">runlevel<\/a> and each service&rsquo;s status, such as:<\/p><ul class=\"wp-block-list\">\n<li><strong>Started <\/strong>&ndash; currently running, active services.<\/li>\n\n\n\n<li><strong>Stopped<\/strong> &ndash; intentionally terminated services.<\/li>\n\n\n\n<li><strong>Crashed <\/strong>&ndash; loaded services that encountered an error and have stopped.<\/li>\n\n\n\n<li><strong>Failed <\/strong>&ndash; services that couldn&rsquo;t start.<\/li>\n\n\n\n<li><strong>Inactive <\/strong>&ndash; inactive services at the current runlevel.<\/li>\n<\/ul><p>Add the <strong>grep<\/strong> command to filter services based on their status. To check service status at another system runlevel, change the default one using this command:<\/p><pre class=\"wp-block-preformatted\">rc runlevel<\/pre><h2 class=\"wp-block-heading\" id=\"h-how-to-manage-linux-services\">How to Manage Linux Services<\/h2><p>Managing Linux services is crucial for your system performance, security, and functionality.<\/p><p>For example, terminating unnecessarily resource-intensive services can minimize hardware usage and optimize your system performance.<\/p><p>Another crucial management task is restarting services. It allows you to clear the loaded services in the system memory and ensure updates are applied properly.<\/p><p>Service management commands differ depending on the init system. We will use <strong>systemctl <\/strong>for this tutorial as it is more commonly used in modern Linux distributions.<\/p><p>To start or stop Linux services with systemctl, run one of the following.<\/p><pre class=\"wp-block-preformatted\">sudo systemctl start service-name<\/pre><pre class=\"wp-block-preformatted\">sudo systemctl stop service-name<\/pre><p>Replace <strong>service-name <\/strong>with the actual name of your service.<\/p><p>To run masked services, remove the property first using the <strong>unmask<\/strong> command.<\/p><p>For managing startup services, use the following:<\/p><pre class=\"wp-block-preformatted\">sudo systemctl enable service-name<\/pre><pre class=\"wp-block-preformatted\">sudo systemctl disable service-name<\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/Terminal_s-output-after-enabling-a-service-with-systemctl.png\"><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"48\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Terminal_s-output-after-enabling-a-service-with-systemctl.png\/public\" alt=\"Terminal's output after enabling a service with systemctl\" class=\"wp-image-93818\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Terminal_s-output-after-enabling-a-service-with-systemctl.png\/w=804,fit=scale-down 804w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Terminal_s-output-after-enabling-a-service-with-systemctl.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Terminal_s-output-after-enabling-a-service-with-systemctl.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/Terminal_s-output-after-enabling-a-service-with-systemctl.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 804px) 100vw, 804px\" \/><\/a><\/figure><\/div><p>Before enabling and disabling running services, check whether other daemons or applications depend on them. Disabling a dependency may cause a service to crash, resulting in system instability. To check service dependencies, use the following command:<\/p><pre class=\"wp-block-preformatted\">sudo systemctl list-dependencies service-name<\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/A-list-of-SSHD-service-dependencies.png\"><img loading=\"lazy\" decoding=\"async\" width=\"774\" height=\"224\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/A-list-of-SSHD-service-dependencies.png\/public\" alt=\"A list of SSHD service dependencies\" class=\"wp-image-93820\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/A-list-of-SSHD-service-dependencies.png\/w=774,fit=scale-down 774w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/A-list-of-SSHD-service-dependencies.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/A-list-of-SSHD-service-dependencies.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/A-list-of-SSHD-service-dependencies.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 774px) 100vw, 774px\" \/><\/a><\/figure><\/div><p>You can also list <strong>reverse dependency<\/strong> &ndash; services that depend on the one you are checking. Here&rsquo;s the command:<\/p><pre class=\"wp-block-preformatted\">sudo systemctl list-dependencies --reverse service-name<\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/A-list-of-SSHD-service-reverse-dependencies.png\"><img loading=\"lazy\" decoding=\"async\" width=\"654\" height=\"79\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/A-list-of-SSHD-service-reverse-dependencies.png\/public\" alt=\"A list of SSHD service reverse dependencies\" class=\"wp-image-93821\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/A-list-of-SSHD-service-reverse-dependencies.png\/w=654,fit=scale-down 654w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/A-list-of-SSHD-service-reverse-dependencies.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/A-list-of-SSHD-service-reverse-dependencies.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/a><\/figure><\/div><p>To modify a service&rsquo;s configuration, use the <strong><a href=\"\/ng\/tutorials\/grep-command-in-linux-useful-examples\/\">grep<\/a><\/strong>, <strong><a href=\"\/ng\/tutorials\/awk-command\/\">awk<\/a><\/strong>, and <a href=\"\/ng\/tutorials\/how-to-use-linux-sed-command-examples\/\"><strong>sed<\/strong><\/a><strong> <\/strong>commands. grep locates the pattern in the configuration file that needs modification. Meanwhile, awk retrieves the value, and sed replaces the target string with the new value.<\/p><p>        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    &#128161; Pro tip                <\/p>\n            <\/div>\n            <p class=\"protip__content\">Not sure how to write commands for your needs or what processes are currently running on your VPS? Use Hostinger's built-in <a href=\"\/blog\/vps-ai-assistant\/\">AI Assistant, Kodee<\/a> to easily generate commands, check running tasks like backups, restores, and reboots, and manage your server to diagnose any issues.<\/p>\n                    <\/div>\n        \n\n\n\n<\/p><p>Another method to manage Linux services in a VPS is to use a hosting control panel, which offers a visual interface. Graphical service management is suitable for beginners because it&rsquo;s simpler than using a <a href=\"\/ng\/tutorials\/what-is-cli\/\">command-line interface<\/a>.<\/p><p>Hostinger offers <a href=\"https:\/\/support.hostinger.com\/en\/articles\/1583571-what-are-the-available-operating-systems-for-vps\">various control panels<\/a>, including Virtualmin, Webmin, and Plesk. Note that the available templates differ depending on your VPS plans&rsquo; virtualization.<\/p><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-vps-hosting\" href=\"\/ng\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,h=1024,fit=scale-down\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p><a href=\"\/ng\/vps-hosting\">Hostinger VPS<\/a> users can easily install the control panel by choosing a template via the <strong>Operating System <\/strong>menu in the VPS management area. To learn more, check out our guide on <a href=\"https:\/\/support.hostinger.com\/en\/articles\/4965922-how-to-change-the-operating-system-for-your-vps\">changing your VPS operating system<\/a>.<\/p><p>    <div class=\"announcement-block announcement-block--warning\">\n        <span class=\"announcement-block__heading\">\n            <svg width=\"24\" height=\"26\" viewBox=\"0 0 24 26\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n                d=\"M12 23.5C17.799 23.5 22.5 18.799 22.5 13C22.5 7.20101 17.799 2.5 12 2.5C6.20101 2.5 1.5 7.20101 1.5 13C1.5 18.799 6.20101 23.5 12 23.5ZM13.637 8.65198C13.637 7.74791 12.9041 7.01501 12 7.01501C11.0959 7.01501 10.363 7.74791 10.363 8.65198C10.5335 10.5375 10.875 14.383 10.875 14.383C10.875 15.0043 11.3787 15.508 12 15.508C12.6213 15.508 13.125 15.0043 13.125 14.383V14.38L13.637 8.65198ZM11.9927 16.714C11.3714 16.714 10.8677 17.2177 10.8677 17.839C10.8677 18.4603 11.3714 18.964 11.9927 18.964H12.0073C12.6286 18.964 13.1323 18.4603 13.1323 17.839C13.1323 17.2177 12.6286 16.714 12.0073 16.714H11.9927Z\"\n                fill=\"#BE1025\"\/>\n            <\/svg>\n            Warning        <\/span>\n        <p class=\"announcement-block__content\">\n            <b>Warning!<\/b> Back up your VPS files before switching to another template. This process will wipe your data.        <\/p>\n    <\/div>\n\n    \n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-linux-service-management-best-practices\">Linux Service Management Best Practices<\/h2><p>In this section, we will explain several Linux service management best practices to help you maintain your system&rsquo;s performance and security efficiently.<\/p><p><strong>Review the Configuration of Each Service on a Regular Basis<\/strong><\/p><p>An update may change a service&rsquo;s default configuration, impacting how it behaves and affecting system performance. Some service options may also be deprecated due to updates.<\/p><p>Regularly checking each service configuration helps you change obsolete settings to ensure the service works properly and meets current security standards.<\/p><p>Moreover, regular checkups help determine which service to tweak when implementing new changes to your server or hosted applications. It ensures the current service configuration meets the new system requirements.<\/p><p><strong>Remove or Disable Services That Are No Longer Required<\/strong><\/p><p>Unnecessary running services can waste resources and slow down your website. Disabling them lets you allocate resources more efficiently, resulting in a more consistent server performance.<\/p><p>In addition, they may also expose your server to cyber attacks. Aside from opening extra ports, they may be outdated and contain unpatched security flaws.<\/p><p>Other than minimizing the cyber attack surface, disabling or removing services simplifies security audits and troubleshooting because there will be fewer instances to analyze.<\/p><p>Finally, it also reduces service conflict errors and potential misconfigurations.<\/p><p>    <div class=\"announcement-block announcement-block--warning\">\n        <span class=\"announcement-block__heading\">\n            <svg width=\"24\" height=\"26\" viewBox=\"0 0 24 26\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n                d=\"M12 23.5C17.799 23.5 22.5 18.799 22.5 13C22.5 7.20101 17.799 2.5 12 2.5C6.20101 2.5 1.5 7.20101 1.5 13C1.5 18.799 6.20101 23.5 12 23.5ZM13.637 8.65198C13.637 7.74791 12.9041 7.01501 12 7.01501C11.0959 7.01501 10.363 7.74791 10.363 8.65198C10.5335 10.5375 10.875 14.383 10.875 14.383C10.875 15.0043 11.3787 15.508 12 15.508C12.6213 15.508 13.125 15.0043 13.125 14.383V14.38L13.637 8.65198ZM11.9927 16.714C11.3714 16.714 10.8677 17.2177 10.8677 17.839C10.8677 18.4603 11.3714 18.964 11.9927 18.964H12.0073C12.6286 18.964 13.1323 18.4603 13.1323 17.839C13.1323 17.2177 12.6286 16.714 12.0073 16.714H11.9927Z\"\n                fill=\"#BE1025\"\/>\n            <\/svg>\n            Warning        <\/span>\n        <p class=\"announcement-block__content\">\n            <b>Warning!<\/b> Don't remove or disable services without understanding the consequences. Always test it in a development environment first to avoid breaking the production server.        <\/p>\n    <\/div>\n\n    \n\n\n\n<\/p><p><strong>Maintain Detailed Documentation for Each Service<\/strong><\/p><p>A Linux VPS can have up to hundreds of active services. Hence, maintaining detailed documentation is crucial for server management. You must track information about each service&rsquo;s name, purpose, configuration options, and dependencies.<\/p><p>For a team, documentation helps onboard new members, allowing them to easily understand the system&rsquo;s setup. It also lets them accurately replicate the current production environment when <a href=\"\/ng\/tutorials\/getting-started-with-vps-hosting\/\">setting up a new VPS<\/a> or local staging area.<\/p><p>Documentation also simplifies server backup and restore, as you can track which services to install and their configurations. Moreover, it is useful for troubleshooting purposes as you can check which services are modified.<\/p><p>To create documentation, use the <strong>&gt; <\/strong>director to output the <strong>systemctl <\/strong>command results in a file. For example, use the following command to create a file containing a service list:<\/p><pre class=\"wp-block-preformatted\">sudo systemctl list-unit-files --type service --all &gt; service_list.txt<\/pre><p><strong>Understand the Dependencies Between Services<\/strong><\/p><p>Before disabling or modifying a service, you must understand its dependencies and which daemons rely on it. This helps prevent other services from crashing, which may cause chain reactions that compromise your system&rsquo;s stability.<\/p><p>For instance, your hosted web application depends on the <strong>PHP-FPM<\/strong> service, which relies on the <strong>Apache httpd <\/strong>daemon. If you disable <strong>Apache httpd<\/strong>, <strong>PHP-FPM<\/strong> will crash, and the web application will stop working.<\/p><p>Since multiple services may rely on one daemon, tracking the root cause can be difficult. We recommend mapping a service&rsquo;s dependency before disabling it for easier debugging.<\/p><p><strong>Monitor the Health and Performance of Services<\/strong><\/p><p>Monitoring a service&rsquo;s health and performance helps you identify issues before they cause performance decline and downtime. It also gives you important data for service logs and diagnostics.<\/p><p>In addition, Linux service monitoring helps determine whether new system changes or updates negatively affect performance. To check service status, use the following systemctl command:<\/p><pre class=\"wp-block-preformatted\">sudo systemctl status service-name<\/pre><p>Replace <strong>service-name<\/strong> with the name of the service. Terminal will show its description, load state, process ID, hardware usage, and service logs.<\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returns-the-status-of-a-service.png\"><img loading=\"lazy\" decoding=\"async\" width=\"754\" height=\"180\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returns-the-status-of-a-service.png\/public\" alt=\"The systemctl command returns the status of a service\" class=\"wp-image-93822\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returns-the-status-of-a-service.png\/w=754,fit=scale-down 754w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returns-the-status-of-a-service.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systemctl-command-returns-the-status-of-a-service.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/a><\/figure><\/div><p>We recommend complementing it with other tools for a more in-depth and accurate analysis. Popular options for such tools include <strong>Prometheus<\/strong> with <strong>Grafana <\/strong>and <a href=\"\/ng\/tutorials\/what-is-new-relic\/\"><strong>New Relic<\/strong><\/a>.<\/p><p>Alternatively, Hostinger users can check the status of a service in their VPS by asking the <strong>Kodee AI assistant<\/strong>. Simply enter, &ldquo;Check the [service-name] service status in my VPS,&rdquo; and Kodee will output the information. <\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"6a58927c0a4f0\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6a58927c0a4f0\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1460\" height=\"485\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/kodee-outputs-the-ssh-service-status.png\/w=1024,h=1024,fit=scale-down\" alt=\"Kodee outputs the SSH service status\" class=\"wp-image-124614\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/kodee-outputs-the-ssh-service-status.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/kodee-outputs-the-ssh-service-status.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/kodee-outputs-the-ssh-service-status.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/kodee-outputs-the-ssh-service-status.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2019\/04\/kodee-outputs-the-ssh-service-status.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--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><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Services or daemons are Linux programs that run in the background. System administrators must understand how to manage services to maintain their server&rsquo;s functionality and performance.<\/p><p>The commands to list services differ depending on the Linux init system. Systemd service listing uses <strong>systemctl<\/strong>, while System V utilizes <strong>service<\/strong>. Moreover, service control tools like Upstart and OpenRC use <strong>initctl<\/strong> and <strong>rc-status<\/strong>, respectively.<\/p><p>In addition to listing, these commands are useful for boot-time service control and managing instances. Users can also check service status by combining them with the <strong>grep<\/strong> command.<\/p><p>To improve server security and performance, regularly check your service configuration files and disable unnecessary ones. Before doing so, always check their dependencies and create documentation to avoid errors and simplify the restoration process.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An operating system requires programs that run in the background called services. In a Linux system, these services are called daemons. They are managed using an init system like systemd. System administrators must understand how to use Linux list services to efficiently manage and troubleshoot their servers. It helps ensure their virtual private server (VPS) [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ng\/tutorials\/manage-and-list-services-in-linux\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":337,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Use Linux List Services in %currentyear%","rank_math_description":"Learn how to list running services in Linux to effectively manage them in your VPS. We provide multiple methods and other useful service tips.","rank_math_focus_keyword":"linux list services","footnotes":""},"categories":[22644],"tags":[],"class_list":["post-16622","post","type-post","status-publish","format-standard","hentry","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/manage-and-list-services-in-linux","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/administrar-y-listar-servicios-en-linux","default":0},{"locale":"en-GB","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/manage-and-list-services-in-linux","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-manage-and-list-services-in-linux","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-manage-and-list-services-in-linux","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/administrar-y-listar-servicios-en-linux","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/administrar-y-listar-servicios-en-linux","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/administrar-y-listar-servicios-en-linux","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/manage-and-list-services-in-linux","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/manage-and-list-services-in-linux","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/manage-and-list-services-in-linux","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/manage-and-list-services-in-linux","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/16622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/users\/337"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/comments?post=16622"}],"version-history":[{"count":24,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/16622\/revisions"}],"predecessor-version":[{"id":145058,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/16622\/revisions\/145058"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media?parent=16622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/categories?post=16622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/tags?post=16622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}