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

Forum rules
Before you post please read how to get help
Post Reply
User avatar
Thrasher88
Level 1
Level 1
Posts: 10
Joined: Wed Mar 09, 2016 8:09 am

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

Post by Thrasher88 » Sat Mar 12, 2016 2:26 am

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?
HP 6730b
Linux Mint 17.3 "Rosa" - Cinnamon (64 bit)

User avatar
xenopeek
Level 24
Level 24
Posts: 24102
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

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

Post by xenopeek » Sat Mar 12, 2016 3:41 am

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.
Image

User avatar
Thrasher88
Level 1
Level 1
Posts: 10
Joined: Wed Mar 09, 2016 8:09 am

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

Post by Thrasher88 » Sat Mar 12, 2016 4:33 am

Thanks dude, created .bashrc in Home folder and it worked just fine!!! Cheers :)
HP 6730b
Linux Mint 17.3 "Rosa" - Cinnamon (64 bit)

Georgia boy
Level 2
Level 2
Posts: 56
Joined: Tue Oct 12, 2010 9:06 am
Location: Arizona

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

Post by Georgia boy » Fri May 20, 2016 11:50 pm

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
Debian testing
Hp Pav a1440n
820 Intel Pent D procces 2 process cores, 2.0GB mem,250GB HD, NVIDA GeForce 7300LE, Intel ViiV.
ASUS A53SD-TS72 Intel Cor i7-2670QM 2.20GHz, 8GB DDR3, 750GB HDD, 2GB NVIDIA GeForce GT 610M, Mint LMDE2 64 bit.

Post Reply

Return to “Scripts & Bash”