How to Completely Disable the GRUB Boot Menu Timeout Countdown in Ubuntu

If you have installed Ubuntu Linux alongside Windows in a “dual-boot” configuration, you will be familiar with the GRUB boot menu. Every time you turn on your computer, this purple text-based menu appears, asking you to choose which operating system you want to load. By default, GRUB provides a 10-second countdown timer. If you do not touch your keyboard within that window, it automatically boots the default operating system (usually Ubuntu).

While the countdown is convenient for some, it can be extremely annoying if you frequently step away from your computer right after pressing the power button, only to return and find it booted into the wrong OS. If you want GRUB to wait indefinitely—forcing you to make a deliberate, manual choice every single time you turn on the machine—you can completely disable the timeout countdown.

Modifying the GRUB Configuration File

Because GRUB controls the absolute lowest level of the boot process, there is no graphical settings panel for it in Ubuntu. You must modify its configuration text file using the terminal.

  1. Log into your Ubuntu desktop.
  2. Press Ctrl + Alt + T to open a new terminal window.
  3. You need administrator privileges to edit the bootloader. Type the following command and press Enter:
    sudo nano /etc/default/grub
  4. Type your administrator password when prompted (the characters will remain invisible) and press Enter.
  5. The nano text editor will open the file directly inside your terminal window. Use the Down Arrow key on your keyboard to scroll down the file until you find a line that looks exactly like this:
    GRUB_TIMEOUT=10
    (The number might be 5 or 30 depending on your exact version, but it is usually 10).
  6. Use your keyboard to delete the number and replace it with -1 (negative one). The line must look exactly like this:
    GRUB_TIMEOUT=-1
  7. To save your changes, press Ctrl + O (the letter O, not a zero), then press Enter to confirm the file name.
  8. To exit the editor, press Ctrl + X.

Updating the Bootloader

You have edited the text file, but the actual bootloader has not been updated yet. If you restart now, the countdown will still happen. You must tell the system to generate a new boot configuration based on the changes you just made.

  1. Back at the normal terminal prompt, type the following command and press Enter:
    sudo update-grub
  2. The terminal will print a few lines of text as it scans your hard drives for operating systems and builds the new boot menu.

Once the process says “done,” you can safely restart your computer. The GRUB menu will appear as normal, but there will be no countdown timer at the bottom of the screen. The computer will sit on that purple menu forever until you physically press Enter to select an operating system.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.