28

Brand new to Linux. I need to turn my box off and put it in my server room. The help here and everywhere seems not to work for me:

http://debianhelp.co.uk/shutdown.htm

I get:

lukepuplett@uktnlx01:~$ poweroff
-bash: poweroff: command not found
lukepuplett@uktnlx01:~$ shutdown
-bash: shutdown: command not found
lukepuplett@uktnlx01:~$ modprobe apm
-bash: modprobe: command not found
lukepuplett@uktnlx01:~$

I also tried halt, reboot, goaway, and pleasejustwork.

Luke Puplett
  • 1,691

5 Answers5

40

You need to be root (or use sudo):

# This halts (shuts down) the computer now
sudo shutdown -h now

# This reboots the computer now
sudo shutdown -r now

Read the manual page for shutdown: man shutdown for more information.

In the link you gave, you just overlooked the sentence

simply run as root:

Giacomo1968
  • 58,727
13

You need to be root (or use sudo):

To shutdow the pc use:

systemctl poweroff

To restart the pc use:

systemctl reboot
Giacomo1968
  • 58,727
2

debian-11.6.0-amd64-netinst minimal with non free firmwares

Fresh installs may not have poweroff or shutdown available to basic users as bash commands.

An alternative way to shutdown is:

systemctl poweroff

My method: Must be root

Login as root:

su root

or my fav

su -

then

reboot

Should work as normal.

This link could help others: https://wiki.debian.org/shutdown

SickProdigy
  • 121
  • 4
1

Had the same issue, and in my (Debian 7) installation

sudo poweroff

or

sudo shutdown

did not work. All I got was command not found. Only after becoming root I could issue the commands. To become root:

su

then poweroff and shutdown works!

ms geek
  • 21
0

halt, run as root, or sudo halt if you are on the sudoers list, should do the trick.

haziz
  • 133