Page 1 of 1

Can't edit bash.bashrc... it's Read Only

Posted: Sat Mar 12, 2016 2:26 am
by Thrasher88
I've installed screenFetch and want to start it when I open the terminal, but can't edit the bash.bashrc file. It's read only. Any suggestions?

Re: Can't edit bash.bashrc... it's Read Only

Posted: Sat Mar 12, 2016 3:41 am
by xenopeek
It's not read only; it's a system file owned by root and you're not permitted to edit those as a regular user. Either create a .bashrc file in your own home directory (probably better) or use sudo/gksudo to edit the file as root.

Use sudo only for using a console editor:

Code: Select all

sudo nano /etc/bash.bashrc
Use gksudo only for using a GNOME based graphical editor:

Code: Select all

gksudo gedit /etc/bash.bashrc
But normally you put customizations for your personal terminal session in ~/.bashrc and avoid modifying system files, which would also be overwritten the next time the package those were installed from gets updated.

Re: Can't edit bash.bashrc... it's Read Only

Posted: Sat Mar 12, 2016 4:33 am
by Thrasher88
Thanks dude, created .bashrc in Home folder and it worked just fine!!! Cheers :)

Re: Can't edit bash.bashrc... it's Read Only

Posted: Fri May 20, 2016 11:50 pm
by Georgia boy
Thanks for this post. I've been looking all over for getting into root .bashrc. Greatly appreciate this poste. Now will save instructions so can edit my regular and root. Need to create some aliases for updates etc. I tend to fat finger at times and aliases are a big help in avoiding a lot of that. :D