What's new

Poweroff

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

WifiGhost

Regular Contributor
While remoted into my new router I saw "poweroff" was an available command so instead of pulling the plug I tried it and nothing happened so I just hit the power button. Isn't poweroff supposed to turn off the device?
 
How would you ever power up (remotely)?
 
While remoted into my new router I saw "poweroff" was an available command so instead of pulling the plug I tried it and nothing happened so I just hit the power button. Isn't poweroff supposed to turn off the device?
Maybe. But as you haven't given us any information whatsoever about this device we can't comment.
 
The vast majority of routers do not have software-controlled power, so they can't turn themselves off. The poweroff command is generally just an alias to shutdown, which simply shuts down the OS itself.

Just like Windows 95 machines back in the AT days, where after shutdown you would get a message telling you that it was now safe to turn off the power.
 
The vast majority of routers do not have software-controlled power, so they can't turn themselves off. The poweroff command is generally just an alias to shutdown, which simply shuts down the OS itself.

Just like Windows 95 machines back in the AT days, where after shutdown you would get a message telling you that it was now safe to turn off the power.
Kinda thought that may have been the case, not a huge fan of just turning things off IF there is a way to halt the system first, thanks for the info, appreciate it
 
The vast majority of routers do not have software-controlled power, so they can't turn themselves off. The poweroff command is generally just an alias to shutdown, which simply shuts down the OS itself.

IIRC - this is linked to busybox as a built-in applet - and as @RMerlin mentions, most consumer routers it means shutdown.

Code:
root@thumper:~# ls -l /sbin | grep busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 halt -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 hwclock -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 ifconfig -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 mkswap -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 pivot_root -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 poweroff -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 reboot -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 route -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 start-stop-daemon -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 swapoff -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 swapon -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 switch_root -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 sysctl -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 udhcpc -> ../bin/busybox
root@thumper:~# ls -l /bin | grep busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ash -> busybox
-rwxr-xr-x    1 root     root        319525 Jul 14 09:09 busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 cat -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 chgrp -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 chmod -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 chown -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 cp -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 date -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 dd -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 df -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 dmesg -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 echo -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 egrep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 false -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 fgrep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 fsync -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 grep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 gunzip -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 gzip -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 kill -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ln -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 lock -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 login -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ls -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mkdir -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mknod -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mktemp -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mount -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mv -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 netmsg -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 netstat -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 nice -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 passwd -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 pidof -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ping -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ping6 -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ps -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 pwd -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 rm -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 rmdir -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sed -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sh -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sleep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sync -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 tar -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 touch -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 traceroute -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 traceroute6 -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 true -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 umount -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 uname -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 vi -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 zcat -> busybox

Keep in mind that busybox is used for many embedded systems where soft power control is supported - so it does serve a purpose
 
IIRC - this is linked to busybox as a built-in applet - and as @RMerlin mentions, most consumer routers it means shutdown.

Code:
root@thumper:~# ls -l /sbin | grep busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 halt -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 hwclock -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 ifconfig -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 mkswap -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 pivot_root -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 poweroff -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 reboot -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 route -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 start-stop-daemon -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 swapoff -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 swapon -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 switch_root -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 sysctl -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 udhcpc -> ../bin/busybox
root@thumper:~# ls -l /bin | grep busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ash -> busybox
-rwxr-xr-x    1 root     root        319525 Jul 14 09:09 busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 cat -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 chgrp -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 chmod -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 chown -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 cp -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 date -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 dd -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 df -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 dmesg -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 echo -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 egrep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 false -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 fgrep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 fsync -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 grep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 gunzip -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 gzip -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 kill -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ln -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 lock -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 login -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ls -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mkdir -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mknod -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mktemp -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mount -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mv -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 netmsg -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 netstat -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 nice -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 passwd -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 pidof -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ping -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ping6 -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ps -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 pwd -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 rm -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 rmdir -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sed -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sh -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sleep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sync -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 tar -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 touch -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 traceroute -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 traceroute6 -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 true -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 umount -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 uname -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 vi -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 zcat -> busybox

Keep in mind that busybox is used for many embedded systems where soft power control is supported - so it does serve a purpose
thanks, appreciate the info
 
IIRC - this is linked to busybox as a built-in applet - and as @RMerlin mentions, most consumer routers it means shutdown.

Code:
root@thumper:~# ls -l /sbin | grep busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 halt -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 hwclock -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 ifconfig -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 mkswap -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 pivot_root -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 poweroff -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 reboot -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 route -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 start-stop-daemon -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 swapoff -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 swapon -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 switch_root -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 sysctl -> ../bin/busybox
lrwxrwxrwx    1 root     root            14 Jul 14 09:09 udhcpc -> ../bin/busybox
root@thumper:~# ls -l /bin | grep busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ash -> busybox
-rwxr-xr-x    1 root     root        319525 Jul 14 09:09 busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 cat -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 chgrp -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 chmod -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 chown -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 cp -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 date -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 dd -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 df -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 dmesg -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 echo -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 egrep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 false -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 fgrep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 fsync -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 grep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 gunzip -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 gzip -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 kill -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ln -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 lock -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 login -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ls -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mkdir -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mknod -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mktemp -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mount -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 mv -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 netmsg -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 netstat -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 nice -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 passwd -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 pidof -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ping -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ping6 -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 ps -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 pwd -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 rm -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 rmdir -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sed -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sh -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sleep -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 sync -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 tar -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 touch -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 traceroute -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 traceroute6 -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 true -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 umount -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 uname -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 vi -> busybox
lrwxrwxrwx    1 root     root             7 Jul 14 09:09 zcat -> busybox

Keep in mind that busybox is used for many embedded systems where soft power control is supported - so it does serve a purpose
so if I am able, would it better to ssh in and issue a poweroff before hitting the power button? I ask as I can start making this my process, I know its not possible to do it everytime, but if issuing poweroff would help prevent issues I am all for it, I have been prepping my new asus with merlin, converting my current scripts to vlanctl and mapping ports so since I am done for the night and about to shut it off so I figure may as well ask before i just press the power button
 
I came here with the same question: Is it better to cleanly shut down rather than just killing the power? My guess is that it doesn't matter for the most important functions, but could matter for AiProtection or other logging/settings saved to NVRAM.

Also ... hate to ask, but what is the command to shut down via SSH? I'm not seeing "poweroff" or anything related as a BusyBox function.
 
Last edited:
I came here with the same question: Is it better to cleanly shut down rather than just killing the power? My guess is that it doesn't matter for the most important functions, but could matter for AiProtection or other logging/settings saved to NVRAM.

Also ... hate to ask, but what is the command to shut down via SSH? I'm not seeing "poweroff" or anything related as a BusyBox function.
try "halt -p"

edit: not tested.
but the "halt" comand did work on the rt-ac86u as far as i recall.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top