LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   make bash interactive and change prompt (http://www.linuxquestions.org/questions/linux-newbie-8/make-bash-interactive-and-change-prompt-182216/)

DropSig 05-16-2004 07:31 PM

make bash interactive and change prompt
 
Im expecting it to be very simple but cant figure it out....
I got SlackWare 9.1 , it does not make bash interactive by default, it does not make a .bashrc or .bashprofile, At least mine did not.
im using konsole for terminal and i wnat the bash to be interactive when teh terminal open, also i want the prompt to say: $USER_$DIR-->

Also .bashrc i have no problem with making it, but what am i suppose to put in .bashprofile , is it really usefull to have one???

slakmagik 05-16-2004 09:00 PM

Slack doesn't set up anything like that. (But bash is interactive - it just may not be a login shell.) ~/.bash_profile is for your login shell - usually set your general environment there. ~/.bashrc is picked up by non-login interactive shells and is generally where aliases and such go. I don't care myself - a usual thing is to source ~/.bashrc from ~/.bash_profile and my thing is just to symlink 'em. As far as your terminal, that's not Slack or bash, really - konsole may have a 'konsole -ls' option or something to make it a login shell. If you've got the ~/.bashrc just add a PS1 to it. Check out 'man bash' for details, but I think export PS1="\u_\w-->" will do.

Farseer3 05-17-2004 01:48 AM

For customizing your bash prompt you can look at this article which gives a nice overview of all the custimization options including color changing and other effects...

320mb 05-17-2004 08:16 AM

Also read the........BASH-prompt how-to @ the linux documentation
project!!


All times are GMT -5. The time now is 05:01 AM.