![]() |
where to add new dirs to PATH?
hi,the /sbin is not in PATH on N810, so I cannot use command like ifconfig, I've tried vi .bashrc in my home dir, but it doesnt work(the .bashrc is not sourced automatically when bash2 startup)
so what should I do next? ps: I have installed bash2, and it always shows full path before the prompt, this is really annoying when the path is very long, how can I make only the last dir is shown like a normal shell always does? THX |
Re: where to add new dirs to PATH?
echo "PATH=/sbin:$PATH" >> ~/.profile
^ should work. As for your second question, look at the file /etc/profile.d/prompt.sh and google bash PS1. Corrected thanks to free here: http://www.internettablettalk.com/fo...73&postcount=4 :) |
Re: where to add new dirs to PATH?
Read man bash, section INVOCATION:
* bashrc is not sourced for interactive login shells, only for non-login shells * profile is source for interfactive login shells As everything inherits from login shells, the place for $PATH setting is in a profile file (/etc/profile, /etc/bash_profile or ~/.profile, ~/.bash_profile) Then some distributions do not follow this, they source .bashrc within .profile but it's not a general rule. |
Re: where to add new dirs to PATH?
Quote:
I guess you meant echo "PATH=/sbin:$PATH" >> ~/.profile |
Re: where to add new dirs to PATH?
Quote:
but I didnt login when I opened a xterminal, why it is a interactive login shell? |
Re: where to add new dirs to PATH?
Quote:
|
Re: where to add new dirs to PATH?
Quote:
Why I use debian on all my machines.. When you open a terminal, it has inherited the variable PATH from the login shell. |
Re: where to add new dirs to PATH?
Put this in bashrc and open a terminal, open another one within this one.
Look at your PATH, it contains two times /sbin ;) |
Re: where to add new dirs to PATH?
excuse me ,just curious,how can I open another terminal within a terminal?
tried osso-xterm but it doesnt work... |
Re: where to add new dirs to PATH?
Sorry, I was talking in general on unix/linux machines.
I don't know for the device. BUt you can can open a new tab. |
All times are GMT. The time now is 00:59. |
vBulletin® Version 3.8.8