Change timeout, kernel flags and defaults to control how Linux boots. 15.11.2025 | reading time: 2 min Boot behavior is decided before the kernel starts; editing GRUB is where he shapes that behavior, from timeout to kernel command line and default entries. Live edit example Here is a concrete example that changes the GRUB timeout to 5 seconds and appends a kernel parameter, then regenerates the config. The commands and expected output are shown literally: ```bash sudo cp /etc/default/grub /etc/default/grub.bak sudo sed -i 's/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=5/' /etc/default/grub sudo sed -i "s/^GRUB_CMDLINE_LINUX=\(.*\)/GRUB_CMDLINE_LINUX=\1\ quiet nomodeset/" /etc/default/grub cat /etc/default/grub | sed -n '1,20p' sudo update-grub ``` A possible terminal response might read: ```plain Sourcing file: /etc/default/grub Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.15.0 Found initrd image: /boot/initrd.img-5.15.0 done ``` Key knobs and scripts Edit `/etc/default/grub` to change variables like `GRUB_TIMEOUT`, `GRUB_DEFAULT` and `GRUB_CMDLINE_LINUX` and use the distribution command that generates the menu (for Debian/Ubuntu `update-grub`, for other systems `grub2-mkconfig -o /boot/grub2/grub.cfg`); to set a one-shot boot use `grub-reboot`, to change default permanently use `grub-set-default`, and always back up the file before running the generator. Other useful considerations Beyond the single config file, custom menu entries belong in `/etc/grub.d/40_custom` or its own script with executable permissions; on UEFI systems `grub-install` and `efibootmgr` matter for where GRUB resides, and when troubleshooting boot failures inspect `/boot/grub/grub.cfg` (do not edit it directly) and boot with a live USB to reinstall or regenerate GRUB. Wrap-up and next steps Editing GRUB gives direct control over boot flow and kernel options; practice safely on a VM, keep backups, and test changes with short timeouts so he can recover if something goes wrong; to deepen skills consider formal study and exam prep at bitsandbytes.academy for CompTIA Linux+ or LPIC-1. Join Bits & Bytes Academy First class LINUX exam preparation. boot-process setup troubleshooting utilities security