Albrechts Blog

About programming, mostly.

Services in Ubuntu 16.04

Ubuntu since 14.04 switches to systemd to manage services. Time to learn something new.

Key to systemd is the command systemctl

Disable a service (so that it does not start when system reboots):
sudo systemctl disable mongodb

Enable a service (for automatic startup when system reboots):
sudo systemctl enable mongodb

Start / Stop a service:
sudo systemctl start mongodb
sudo systemctl stop mongodb

Further helpful tweaks for systemd on this page. See also this former post about upstart and systemv runlevels.

Comments