{"id":10259,"date":"2020-06-08T15:10:39","date_gmt":"2020-06-08T15:10:39","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=10259"},"modified":"2021-07-17T07:59:36","modified_gmt":"2021-07-17T07:59:36","slug":"hide-grub-boot-menu-ubuntu-20-04-lts","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2020\/06\/hide-grub-boot-menu-ubuntu-20-04-lts\/","title":{"rendered":"How to Hide Grub Boot Menu in Ubuntu 20.04, 21.10 (Updated)"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/ubuntu-icon.png\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-full wp-image-10245\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/ubuntu-icon.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/ubuntu-icon-150x150.png 150w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<p><b>This simple tutorial shows how to hide \/ disable the Grub boot menu while booting Ubuntu.<\/b> <\/p>\n<p>You can do the job easily via <b>Grub-Customizer<\/b> (available in Ubuntu Software) under <i>General Settings tab<\/i>. However, you need to also disable &#8220;<i>look for other operating systems<\/i>&#8221; option. <\/p>\n<p>Any time you want to show the Grub menu, <u>press <b>ESC<\/b> while booting up will <b>NO<\/b> longer show dual-boot (multi-boot) systems other than Ubuntu<\/u>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/show-menu.png\" alt=\"\" width=\"600\" height=\"373\" class=\"aligncenter size-full wp-image-10260\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/show-menu.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/show-menu-450x280.png 450w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><b>NOT OK with Grub-Customizer settings?<\/b> Re-enable &#8220;<i>show menu<\/i>&#8221; and &#8220;<i>look for other operating systems<\/i>&#8221; options, <i>save<\/i> changes, and do following steps one by one.<\/p>\n<h3>Hide boot menu by manually editing the config file:<\/h3>\n<p>In most Linux including Ubuntu, you can edit the <code>\/etc\/default\/grub<\/code> file along with scripts under <code>\/etc\/grub.d<\/code> to control how the Grub boot menu works.<\/p>\n<p><b>1.)<\/b> Firstly, open terminal from system app launcher. Run command to edit the configuration file:<\/p>\n<pre>sudo -H gedit \/etc\/default\/grub<\/pre>\n<p><i>For Ubuntu flavors \/ Linux Mint, replace <code>gedit<\/code> with your favorite text editor.<\/i><\/p>\n<p>When the file opens, you need to set following lines:<\/p>\n<ul>\n<li><b>GRUB_TIMEOUT_STYLE=hidden<\/b> &#8211; Hide the boot menu. Though it still wait a few seconds you set by GRUB_TIMEOUT.<\/li>\n<li><b>GRUB_TIMEOUT_STYLE=countdown<\/b> &#8211; Hide boot menu and show countdown. Even set GRUB_TIMEOUT=0. It counts 3,2,1.<\/li>\n<li><b>GRUB_TIMEOUT = 0<\/b> &#8211; It will boot the default OS immediately. However, you may set it to <b>3<\/b> or <b>5<\/b> so you can press ESC (F4 or hold Shift) during the time to show the boot menu if need.<\/li>\n<li><b>GRUB_DISABLE_OS_PROBER=true<\/b> &#8211; Disable &#8220;<i>\/etc\/grub.d\/30_os-prober<\/i>&#8221; because it overwrite the value of GRUB_TIMEOUT_STYLE. However, it will no longer find other OSes other than Ubuntu.<\/li>\n<li><b>GRUB_RECORDFAIL_TIMEOUT=0<\/b> &#8211; Set timeout if last boot failed. Without the key, it will show and stop at boot menu waiting user action.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/hide-grubmenu.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/hide-grubmenu-600x309.jpg\" alt=\"\" width=\"600\" height=\"309\" class=\"aligncenter size-large wp-image-34181\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/hide-grubmenu-600x309.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/hide-grubmenu-300x154.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/hide-grubmenu-768x395.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/hide-grubmenu.jpg 775w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><b>2.) Step 1. will do the job after applying changes<\/b>. However, it will no longer display other operating systems if any in your machine. <\/p>\n<p>In case you want to boot other OS once in a while. Modify <code>30_os-prober<\/code> file <i>instead of disable it via &#8220;GRUB_DISABLE_OS_PROBER=true&#8221;<\/i>.<\/p>\n<p>To do so, run command:<\/p>\n<pre>sudo gedit \/etc\/grub.d\/30_os-prober<\/pre>\n<p>And set <b>quick_boot=&#8221;0&#8243;<\/b>. So it will no longer overwrite &#8220;<i>GRUB_TIMEOUT_STYLE<\/i>&#8221; value you set in step 1, while also find other OSes on your machine.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/disable-quickboot.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/disable-quickboot-600x428.jpg\" alt=\"\" width=\"600\" height=\"428\" class=\"aligncenter size-large wp-image-34182\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/disable-quickboot-600x428.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/disable-quickboot-300x214.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/disable-quickboot-768x548.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/06\/disable-quickboot.jpg 775w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><b>3.) Finally apply changes<\/b> via command:<\/p>\n<pre style=\"border:none;\">sudo update-grub<\/pre>\n<h4>How to restore:<\/h4>\n<p>Just undo what you did in step 1 and \/ or 2 and apply change by running command <code>sudo update-grub<\/code>.<\/p>","protected":false},"excerpt":{"rendered":"<p>This simple tutorial shows how to hide \/ disable the Grub boot menu while booting Ubuntu. You can do the job easily via Grub-Customizer (available in Ubuntu Software) under General Settings tab. However, you need to also disable &#8220;look for other operating systems&#8221; option. Any time you want to show the Grub menu, press ESC [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1111],"class_list":["post-10259","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-hide-grub-menu"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/10259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=10259"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/10259\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=10259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=10259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=10259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}