0

I recently installed Raspbian Lite (stretch) on my Raspberry Pi 3b+, and followed these instructions to get MATE installed, which worked fine (with the exception of having to use -o Acquire::ForceIPv4=true on pretty much all the apt-get commands, and a couple that I had to -f. (I don't remember which, sorry!)

Before/during installing MATE, I had shutdown.

But now when I try to run shutdown, I get:

bash: shutdown: command not found

I found this answer about Debian, but my systemd-sysv is installed and up to date:

fractangle@pi3bp:~ $ sudo apt-get upgrade systemd-sysv
Reading package lists... Done
Building dependency tree       
Reading state information... Done
systemd-sysv is already the newest version (232-25+deb9u2).
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I also looked at this question, but all the answers there seem to be predicated on the presence of shutdown (or halt, or reboot, or poweroff) and I have none of those.

I know there's always systemctl poweroff, but I miss shutdown. *sniff*

1 Answers1

2

A non root user is not allowed to shutdown.

Be sure you really use sudo to execute the command.

sudo shutdown -h now

Note that the shutdown command is in /sbin/shutdown, which is only in the root user's PATH, which is why the command appears not to exist for regular users.

Aurora0001
  • 6,357
  • 3
  • 25
  • 39
Dave
  • 46
  • 6