Posted 16 days ago. Visible to the public.

Manage Linux services on the command line (Ubuntu)

Ubuntu 18.04 uses systemd to manage services.

See which Services are running

To get an overview which services are available and running / not running, you can use service --status-all:

>service --status-all [ + ] acpid [ - ] alsa-utils [ - ] anacron [ + ] apache-htcacheclean [ - ] apache2 [ + ] apparmor [ + ] apport [ + ] avahi-daemon [ + ] avahi-dnsconfd [ - ] bluetooth [ - ] [ - ] brltty ...

+ means running, - means not running, ? means unknown

Manage Services

To temporarily start or stop an service, you can use either service or systemctl:

  • service <name> start or systemctl start <name>
  • service <name> stop or systemctl stop <name>

To prevent a service from being started e.g. on boot, you have to disable it. Likewise, if you want a service to be started on boot, you have to enable it:

  • systemctl enable <name>
  • systemctl disable <name>

If you disable a running service, it will not be stopped. It will just not be started on the next boot. So if you want to stop a service now and disable it, you have to do both steps:

>service --status-all | grep bluetooth [ + ] bluetooth >sudo service bluetooth stop >service --status-all | grep bluetooth [ - ] bluetooth >sudo systemctl disable bluetooth Synchronizing state of bluetooth.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install disable bluetooth insserv: warning: current start runlevel(s) (empty) of script `bluetooth' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `bluetooth' overrides LSB defaults (0 1 6). Removed /etc/systemd/system/dbus-org.bluez.service.

By refactoring problematic code and creating automated tests, makandra can vastly improve the maintainability of your Rails application.

Owner of this card:

Judith Roth
Last edit:
16 days ago
by Judith Roth
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Judith Roth to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more