Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-16-2004, 07:31 PM   #1
Registered: Apr 2004
Location: East of Quebec
Distribution: Ubuntu, Centos
Posts: 208

Rep: Reputation: 30
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???
Old 05-16-2004, 09:00 PM   #2
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
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.
Old 05-17-2004, 01:48 AM   #3
LQ Newbie
Registered: May 2004
Posts: 15

Rep: Reputation: 0
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...
Old 05-17-2004, 08:16 AM   #4
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Also read the........BASH-prompt how-to @ the linux documentation


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
bash prompt subG Slackware 6 01-18-2006 04:43 PM
Is there an interactive way to change date/time from commandline? Akhran Linux - Newbie 1 10-13-2005 11:18 PM
help! bash command prompt font/color change richiangpan9 Linux - Newbie 3 04-24-2005 11:34 AM
How do I change the bash prompt in SuSE 8.2 Joey.Dale Linux - Distributions 3 12-08-2003 08:01 AM
help with bash prompt everythingand2 Linux - Newbie 7 12-06-2003 04:28 PM

All times are GMT -5. The time now is 07:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration