root@gcomputer:~# systemctl status x11-common
● x11-common.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
I tried systemctl unmask x11-common
and systemctl unmask x11-common.service
but that did not change anything.
How do I unmask it?
Best Answer
The commands you are using are both correct. See also the manual.
It seems the
unmask
command fails when there is no existing unit file in the system other than the symlink to/dev/null
. If youmask
a service, then that creates a new symlink to/dev/null
in/etc/systemd/system
where systemd looks for unit files to load at boot. In this case, there is no real unit file.Others seem to have similar issues
x11-common.service
was also masked on my system. You can fix it like this:First check that the unit file is a symlink to
/dev/null
it should return:
in which case, delete it
Since you changed a unit file, you need to run this:
now check the status:
if it doesn't say loaded and running (if the circle is still red), reinstall the package:
and reload the daemon again
and check status once more
Now it's green and running :) The service has no systemd unit file, but systemd happily uses the script for it in
/etc/init.d
instead.