Using services in linux with Systemctl

Services in Linux are generally things that run in the background providing a useful function or 'service'. Systemctl is the 'service manager'.

What is systemctl

systemctl is the service controller interface in Linux. It is the brains of the operation. Using this program you can start, stop, disable or tell a service to run on startup automatically. These functions are generally what most use cases of systemctl fall under.

Enable or Disable a service

To temporarily enable or disable a service (resets on boot)

  • sudo systemctl stop <service_name>
  • sudo systemctl start <service_name>

To permantly enable or disable a service (does not resets on boot)

  • sudo systemctl disable <service_name>
  • sudo systemctl enable <service_name>

Enable to Disable Snap Services

The snap store manages services for applications installed with snap internally. You can manipulate services managed by snap using the following

  • sudo snap services
  • sudo snap restart <service_name>
  • sudo snap start/stop <service_name>