Since I am new and cannot comment on this yet, I'll open a new question...
The question is about Systemd/Systemctl
not allowing one to shutdown or reboot.
The answer I wanted to comment on is saying that you can simply type:
systemctl enable poweroff.target
to resolve the issue. This however, at least on my system, does not work.
As you can see in the below attempt, I was logged in (sudo su) to root, and even root isn't allowed to reboot:
root@Vidar:/home/bokkie# systemctl enable poweroff.target
root@Vidar:/home/bokkie# shutdown -r now
Failed to start reboot.target: Transaction is destructive.
See system logs and 'systemctl status reboot.target' for details.
root@Vidar:/home/bokkie#
The only option I seem to have to reboot is to do a hard (longer power button press) shutdown.
Can I replace systemd, or somehow convince systemctl that shutting down/rebooting is allowed? If yes, how?
sudo shutdown -p now
. Your runningsystemd
which is for Ubuntu 16.04 and abovesystemctl
doesn't exist on Ubuntu 14.04