-   Linux - Newbie (
-   -   make bash interactive and change prompt (

DropSig 05-16-2004 08: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 10: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 02: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 09:16 AM

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

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