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.


Masking a service will prevent it from starting.

To unmask a service run:

systemctl unmask name.service


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

  • why it is masked in the first place? I didn't do any command to mask the service!
    – shamaseen
    Aug 23 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.