I am trying to set GRUB to not show at startup by using the command line. For this I try editing /etc/default/grub
with sudo
, but I get a Permission denied
error as a response:
myuser@mysystem:~$ sudo echo "GRUB_HIDDEN_TIMEOUT_QUIET=true" >> /etc/default/grub
bash: /etc/default/grub: Permission denied
What I want to set:
sudo echo "" >> /etc/default/grub
sudo echo "# Hide Grub" >> /etc/default/grub
sudo echo "GRUB_HIDDEN_TIMEOUT=0" >> /etc/default/grub
sudo echo "GRUB_HIDDEN_TIMEOUT_QUIET=true" >> /etc/default/grub
sudo update-grub
Permissions of the file:
myuser@mysystem:~$ ll /etc/default/grub
-rw-r--r-- 1 root root 1211 Feb 12 20:00 /etc/default/grub
Shouldn't I be able to use sudo
to edit this file? Why doesn't sudo
give me the permission even though the file belongs to root:root
?
EDIT:
Found out that the two above GRUB settings do not work for the desired goal. To still achieve GRUB not showing the following setting needs to be added to /etc/default/grub
using:
sudo bash -c "echo 'GRUB_DISABLE_OS_PROBER=true' >> /etc/default/grub"
terminal
, dosudo -H gedit /etc/default/grub
, modify the EXISTING lines that match what you need to change, save the file, thensudo update-grub
. – heynnema Feb 12 '19 at 21:44sudo bash -c "echo 'GRUB_HIDDEN_TIMEOUT=0' >> /etc/default/grub"
. – Socrates Feb 13 '19 at 10:31