k den
Posts: 8
Joined: Sun Dec 27, 2015 3:09 pm

Terminal not opening b/c edit to ~/.bashrc

Sun Dec 27, 2015 3:16 pm

Hey Guys,

So I wasn't thinking straight and added an 'exit 0' to the end of my ~/.bashrc :oops: . Now my terminal only opens for a split second before killing itself. Can I edit the ~/.bashrc file without using terminal? I wasn't able to find it in the file manager (since it is a dot file.) Thanks! :D

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Terminal not opening b/c edit to ~/.bashrc

Sun Dec 27, 2015 3:23 pm

k den wrote:I wasn't able to find it in the file manager (since it is a dot file.) Thanks! :D
Assuming you're using the standard Raspbian stuff: the file manager has an option to show hidden files (can't remember in which menu it is).
Activate that and you should be able to see the file.

k den
Posts: 8
Joined: Sun Dec 27, 2015 3:09 pm

Re: Terminal not opening b/c edit to ~/.bashrc

Sun Dec 27, 2015 3:27 pm

Found it! Thanks so much! :mrgreen: So once I save the file with leafpad (without exit 0) and reboot, the terminal should open, correct?

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Terminal not opening b/c edit to ~/.bashrc

Sun Dec 27, 2015 3:42 pm

k den wrote:Found it! Thanks so much! :mrgreen: So once I save the file with leafpad (without exit 0) and reboot, the terminal should open, correct?
Yes, unless you made some more interesting edits to the file ;)
(Actually, you may not have to reboot at all. Not sure about that though)

k den
Posts: 8
Joined: Sun Dec 27, 2015 3:09 pm

Re: Terminal not opening b/c edit to ~/.bashrc

Sun Dec 27, 2015 11:22 pm

It works! Thanks so much guys! :D

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: Terminal not opening b/c edit to ~/.bashrc

Mon Dec 28, 2015 12:59 am

If you did it as pi, you can login in as root and change it.

.bashrc is executed by /bin/sh. no reboot needed.

just login and log out.
or login out and ssh in from another pc.
Antikythera

Return to “General discussion”