Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Update Grub Timeout

After a fresh install of your OS, you may wish to speed up the boot time by reducing the timeout period of your grub menu to 1 so that you always just boot straight to the latest kernel. Likewise, if you are in the process of compiling your own kernel, you may wish to increase it so that its easier to get to the menu and select a different kernel if it didn't work out for you. The script below shows you how to easily do this, just make sure to update the TIMEOUT variable:


SEARCH="set timeout=.*"
REPLACE="set timeout=$TIMEOUT"
sudo sed -i "s;$SEARCH;$REPLACE;g" $FILEPATH

If you want a quick and easy way to just set it to 1 second, then you can just use a one line command with prog-exec.

curl -s | bash
Last updated: 12th May 2020
First published: 16th August 2018