Forum › Forums › New users › New Users and General Questions › “shutdown now” never shut it down (i.e. powered off)
Tagged: shutdown
- This topic has 8 replies, 5 voices, and was last updated Jul 26-10:22 pm by Brian Masinick.
-
AuthorPosts
-
July 26, 2021 at 12:18 am #63590Member
Bajingan
shutdown nownever really shut it down. Instead, it prompts to ask root password to do maintenance routine of something, or doing nothing with blinking cursor in Linux prompt.If I press Ctrl+D, it would start the OS up.
July 26, 2021 at 12:23 am #63591Moderator
christophe
::I don’t see a question here — but I think you are looking for the command to shut down?
sudo poweroffshuts you down from command line without asking for password.
EDIT:
or using the shutdown command, as you did:
sudo shutdown -h nowdoes shut down & halt the computer, after entering password.
Let us know if I missed what you were asking. đ
- This reply was modified 1 year, 9 months ago by christophe. Reason: added shutdown command part
confirmed antiX frugaler, since 2019
July 26, 2021 at 3:24 am #63596Moderator
Brian Masinick
::I usually say either
Sudo halt
Or
sudo power off
If I type something; otherwise I use the window manager or desktop environment to halt the system.
--
Brian MasinickJuly 26, 2021 at 9:01 am #63603MemberBajingan
::But, what I don’t understand is why
shutdown nowbehaves like that?After stopping the services, then ask a root password or press Ctrl+D to continue.
July 26, 2021 at 11:38 am #63605Memberseaken64
::the shutdown command has a lot of switches/arguments. Did you read the man page for shutdown for clues as to what the different switches do?
Seaken64
July 26, 2021 at 11:51 am #63606Memberseaken64
::My guess is that this is the behavior if you are not root or do not proceed the command with sudo.
Seaken64
July 26, 2021 at 12:38 pm #63610Member
blur13
::You need to use the -h option to get the shutdown behavior youâd expect coming from windows. Took some time to figure that out for me as well.
July 26, 2021 at 10:19 pm #63682Moderator
Brian Masinick
::I still recommend simply typing in the command you want, for instance, sudo reboot, sudo halt, or sudo poweroff.
However, if you INSIST to do it another way (and it was recommended that you read the shutdown man page; well, here it is:
man shutdown:
SHUTDOWN(8) shutdown SHUTDOWN(8) NAME shutdown - Halt, power-off or reboot the machine SYNOPSIS shutdown [OPTIONS...] [TIME] [WALL...] DESCRIPTION shutdown may be used to halt, power-off or reboot the machine. The first argument may be a time string (which is usually "now"). Optionally, this may be followed by a wall message to be sent to all logged-in users before going down. The time string may either be in the format "hh:mm" for hour/minutes specifying the time to execute the shutdown at, specified in 24h clock format. Alternatively it may be in the syntax "+m" referring to the specified number of minutes m from now. "now" is an alias for "+0", i.e. for triggering an immediate shutdown. If no time argument is specified, "+1" is implied. Note that to specify a wall message you must specify a time argument, too. If the time argument is used, 5 minutes before the system goes down the /run/nologin file is created to ensure that further logins shall not be allowed. OPTIONS The following options are understood: --help Print a short help text and exit. -H, --halt Halt the machine. -P, --poweroff Power-off the machine (the default). -r, --reboot -h Equivalent to --poweroff, unless --halt is specified. -k Do not halt, power-off, reboot, just write wall message. --no-wall Do not send wall message before halt, power-off, reboot. -c Cancel a pending shutdown. This may be used to cancel the effect of EXIT STATUS On success, 0 is returned, a non-zero failure code otherwise. SEE ALSO systemd(1), systemctl(1), halt(8), wall(1) systemd 247 SHUTDOWN(8) an invocation of shutdown with a time argument that is not "+0" or "now".- This reply was modified 1 year, 9 months ago by Brian Masinick.
--
Brian MasinickJuly 26, 2021 at 10:22 pm #63687Moderator
Brian Masinick
::I got that from a different system; we don’t DO systemd here; that one came from the siduction 2021 C-Blues man page, sorry!
--
Brian Masinick -
AuthorPosts
- You must be logged in to reply to this topic.