BASH amnesia. My first stupid for the day...

Icarus's picture

Forums: 

Hello all, long time reader, first time poster ;), Ive been using various distros for only about a year and a half, so this probably falls into the tragic noob category, but nonetheless, here goes:

Okay, I've begun studying android develpment using the SDK package through Eclipse. Seeing as how the kit is fairly large and I have an older laptop, I decided to move it to its own partition on an external HD (/dev/sdb1), which I mount as /env/asdk (manually so far. I havnt gotten to the automount at startup point yet). I directed bash to the new location by adding the line in bashrc

All seemed well as Eclipse could locate it, untill I tried to use bash again, and to my suprise and horror, I found that bash no longer knows how to locate ANYTHING else, (nano, aptitude, etc etc) Im sure that me fooling around with the file is the cause, and I could probably just undo what I did through a live disc, but I would really like to know exactly what the problem is so I can make sure not to do it again, and still be able to keep the sdk tools reachable... Any insight from you guys would be greatly appreciated

version -can't seem to find the actual deb version... I installed through Kali (1.0.6) so I could test my home server's security (its s new install from arch, and initially from slackware; love it but lack of dep checks really cut into my day)

Thanks

*note - when opening the /etc/bash/barshrc from a browser, I dont see the changes I made. Is this a different file?

update-

Icarus's picture

I-m so happy update-
ok, I deleted the lines in .bashrc with nano using the path to nano (handy little trick),
< /usr/bin/nano .bashrc >
and now I'm back in business. So my question now is how do I redirect the path to those files universally (ie, for bash and any program that looks for them) from the old location to the new one without upsetting bash?

Paths

IntnsRed's picture

and to my suprise and horror, I found that bash no longer knows how to locate ANYTHING else, (nano, aptitude, etc etc)

The PATH environment variable tells the shell what subdirectories to look into when you run a command.

So my question now is how do I redirect the path to those files universally (ie, for bash and any program that looks for them) from the old location to the new one without upsetting bash?

The PATH used to be set individually for each user. While I'm not sure about all of the reasons why it was done, in what I view a blatant violation of the KISS principle, the PATH in Debian is now set via /etc/profile and then additions can be added via ~/.bash_profile (a commented-out example appended subdir to the path is included in Debian's default .bash_profile).

The system is no doubt functional, it's just much more convoluted or complex compared to the old style of setting the entire path with one statement in the .bashrc file.

I'm not sure what Eclipse needs for a path, but playing around with your .bash_profile path statement should be able to accomplish what you need.