I was trying to restart the systemd-resolved.service
with the command:
sudo systemctl restart systemd-resolved
and got the error message:
Failed to restart systemd-resolved.service: Unit systemd-resolved.service is masked.
File the systemd-resolved.service
exists in the folder /lib/systemd/system
.
The status of the service is:
/lib/systemd/system# systemctl status systemd-resolved.service
● systemd-resolved.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
When I try to execute with:
/lib/systemd/system/systemd-resolved.service
-bash: /lib/systemd/system/systemd-resolved.service: Permission denied
What am I doing wrong?
Unit
, the service cannot start unless you have drop-in in/etc/systemd/system/
or in other paths as per documentation. Removing the file is a bad advice. – RomanK Nov 05 '20 at 19:03