36

I have Ubuntu and Windows 10 with dual boot in a scratch computer (I'm too inexperienced to use anything else). The problem is, every time I try to shutdown from Ubuntu, the computer just reboots and loads the GRUB screen, so that means I can only turn off the computer from Windows 10 and not from Ubuntu.

Can I turn off my PC from the GRUB screen? I do not want to have to turn off from Windows 10 every time I shut down the PC from Ubuntu.

karel
  • 122,292
  • 133
  • 301
  • 332
J. Doe
  • 523

5 Answers5

45

From this interesting thread on ubuntuforums.org:

In the GRUB menu, press C and then enter halt.

Also as noted in the link, it is safe to simply press the power button while at the GRUB menu.

Byte Commander
  • 110,243
6

In the GRUB command line, the equivalent of poweroff is halt:

grub> halt
Zanna
  • 72,312
whbb98
  • 69
4

As per this page, you can do it by adding custom menu options.
sudo gedit /etc/grub.d/40_custom

Add these options:

 menuentry "Reboot" {
      reboot
}

menuentry "Shut Down" { halt }

Update:
sudo update-grub

Reboot:
reboot

Nav
  • 1,149
  • 13
  • 26
1

Have you tried to shutdown your computer from Ubuntu with one of these commands ? poweroff or sudo shutdown -h now ?? Your script responsible for shutting your computer off is maybe corrupt. If it is the case, these commands would do the job.

To explicitly answer your actual question (shutting down from the grub), I would hold the power button manually. I do so when I accidentally turn on my computer and finally don't want to :)

0

In my case halt in GRUB hangs up the system and nothing happens. So I have to press the power key to poweroff the computer.

Zanna
  • 72,312