What is a masked service?

83,315

Masking a service will prevent it from starting.

To unmask a service run:

systemctl unmask name.service

Source:

How to Manage Systemd Services on a Linux System | How To Geek

Share:
83,315

Related videos on Youtube

Joseph-L-S
Author by

Joseph-L-S

Updated on September 18, 2022

Comments

  • Joseph-L-S
    Joseph-L-S over 1 year

    I would like to understand what a masked service is and how to unmask it if need be.

    I have been trying to start PostgreSQL on Ubuntu 16.04-LTS using the command

    systemctl start postgresql.service.
    

    Both as a user with administrative privileges, as well as root respectively.

    Unfortunately, I got

    Failed to start postgresql.service: Unit postgresql.service is masked.
    

    printed in both scenarios.

  • shamaseen
    shamaseen over 2 years
    why it is masked in the first place? I didn't do any command to mask the service!
  • Ivan Marjanovic
    Ivan Marjanovic over 2 years
    Think of masked service as a disabled one, but... Disabled services are disabled in the sense that they won't be started at boot time but another service can request them to be started. Masked services can not be sated even if other services require them to start.
  • David
    David about 2 years
    There is not Ubuntu version 20.