edit grub file code example
Example: edit grub file
#You should add this option to /etc/default/grub, firstly:
sudo nano /etc/default/grub
#and then add nomodeset to GRUB_CMDLINE_LINUX_DEFAULT:
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
GRUB_CMDLINE_LINUX=""
#And then save by hitting Ctrl+O, then exit nano with Ctrl+X, then simply run:
sudo update-grub