Please I need help with this:
#!/bin/bash
#
su -l
shutdown -h now
Just type rm -rf\
>
>>55870091
sudo shutdown -h now
add something in your sudoers to allow you to shutown without a password then fuck off to >>>/g/sqt or >>>/g/dpt
>>55870091
here's your problem. "su" creates a whole new instance of the BASH shell running as root. However, the "shutdown" command is still being run by the "original" BASH process, ostensibly after the "su" command finishes. The "su" command won't finish until you log out of the "new" BASH session.
If you just want to run one command as root, instead of starting a new shell session as root, use "sudo."
"su" = "switch user"
"sudo" = "switch user and do something."
>>55870091#!/bin/sh
sudo shutdown -h now
Trypoweroff
No need for root permission, at least in arch
You can also use init 6 to shutdown your machine IIRC.
>>55871975
init 6 is reboot. init 5 is shutdown.
>>55871953
>#!/bin/sudo shutdown -h now
>>55870091
doas poweroff