How services works in Linux

Daemons are processes that run in background that perform specific tasks, that start automatically at boot time and runs till the system shutdown or stopped manually. Daemon program names ends with d

Systemd is the first program that starts and following which multiple services starts including dependent services For Example, Services that require network services wont start until network is available

 

Some useful Commands

  • ·         Systemctl – you will see UNIT , LOAD, ACTIVE, SUB, DESCRIPTION column . Sample output attached below

 


  • systemctl list-units --type=[service, scope, mount, socket]

 

To list the dependancy of the service

  • ·         systemctl list-dependencies <service>

To check the status of the service

  • ·         systemctl status <service>

To verify the status of the service

  • ·         systemctl is-active <service>
  • ·         systemctl is-enabled <service>

To control the service

  • ·         systemctl start <service>
  • ·         systemctl stop <service>
  • ·         systemctl restart <service>
  • ·         systemctl reload <service>
  • ·         systemctl reload-or-restart <service>


Comments

Popular posts from this blog

How to setup SSH Key-Based Authentication (Private & Public keys)

Permissions in Linux