Trying to modify /etc/bash.bashrc
I get an error:
$ echo "my edit" >> /etc/bash.bashrc
bash: /etc/bash.bashrc: Permission denied
ls -ll /etc/bash.bashrc
shows:
-rw-r--r-- 1 root root 1975 2011-05-18 19:54 /etc/bash.bashrc
How could I modify /etc/bash.bashrc
?
sudo $EDITOR /etc/bashrc
. You can set $EDITOR in your .bashrc as well (with - e.g. -export EDITOR=vim
). Or you can simply run (e.g.)sudo atom /etc/bashrc
which will use the atom editor, or you can replace "atom" with whatever.