Links
Comment on page

Services

What is a Linux service?

Description

  • Linux services are applications or processes that run in the background either because they're actively doing something or waiting to do something.
  • An example service would be OpenBSD Secure Shell server, a service that allows one to connect to the system via SSH.

Interacting with Services

  • systemctl is the system manager tool which is responsible for managing services.
  • systemctl list-unit-files - View all services available.
UNIT FILE STATE PRESET
proc-sys-fs-binfmt_misc.automount static -
-.mount generated -
dev-hugepages.mount static -
dev-mqueue.mount static -
home.mount generated -
proc-sys-fs-binfmt_misc.mount disabled disabled
run-vmblock\x2dfuse.mount enabled enabled
[SNIP]
  • systemctl status ssh - Gets information on the status of ssh
○ ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; disabled; preset: enabled)
Active: inactive (dead)
Docs: man:sshd(8)
man:sshd_config(5)
  • sudo systemctl start ssh - Starts the ssh service
  • sudo systemctl stop ssh - Stops the ssh service
  • sudo systemctl enable ssh - Enables the ssh service to run on system boot
  • sudo systemctl disable ssh - Disables the ssh service from running on system boot