Kam
Kam

Reputation: 6008

bash_profile not working as it should

Hi Im running linux angstrom distribution on a remote device, I added .bash_profile and .bashrc to /home/root since they didn't exist and I wrote this in them

PATH=/opt/qt-arm/lib:$PATH 
export PATH

But now when I login to this device and type $PATH I don't see the newly added path...Any Ideas??

Upvotes: 2

Views: 2527

Answers (2)

je4d
je4d

Reputation: 7848

I added .bash_profile and .bashrc to /home/root since ...

Look in /etc/passwd to check whether /home/root is actully root's home directory. On most linux distributions, it is just /root, not /home/root.

Update in response to comments:

.bash_profile and .bashrc are only inspected if the user's shell is bash. You can see what root's shell is in /etc/passwd.

Upvotes: 3

Matteo
Matteo

Reputation: 14940

Usually the home directory of the root account is /root (not in /home/root/).

Upvotes: 1

Related Questions