Sunday, March 16, 2025

If the reboot command is missing, try these solutions:

1. Use systemctl reboot
On Debian 12 or other systemd-based distributions, reboot is essentially an alias for systemctl reboot. If reboot is not found, try:

systemctl reboot

2. Run /sbin/reboot Directly
Sometimes, reboot might not be in your PATH. Try running it directly:

/sbin/reboot

If this works, your PATH might be misconfigured. Check it with:

echo $PATH

If /sbin is missing, temporarily add it:

export PATH=$PATH:/sbin:/usr/sbin

3. Check If reboot Is Missing
If the command is truly missing, reinstall it with:

apt update
apt install systemd-sysv -y

The systemd-sysv package includes reboot, shutdown, and other essential commands.

4. Use shutdown Instead
If reboot is unavailable, try:
shutdown -r now
-r means reboot
now means execute immediately
If none of these solutions work, check if /sbin/reboot exists:

ls -l /sbin/reboot

If it’s missing, verify whether it was removed or replaced using:

which reboot
type reboot