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!
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
03-28-2004, 07:19 PM
#1
LQ Newbie
Registered: Mar 2004
Posts: 2
Rep:
Changing the BASH Prompt
Accidentally posted this in the general forum, meant to post it here.
Hi,
Fairly new to Linux here.
I would like to change my BASH prompt to the full path followed by the $.
When I add the line:
export PS1="[\w] \$ "
in my .bashrc file in my home directory, my prompt displays as:
[~] $
To see if maybe I was not putting the right information in the export line, I tried a couple more escape characters.
export PS1="[\d] \$ " displayed:
[Sun Mar 28] $
export PS1="[\W] \$ " displayed:
[pete] $
Here is my entire .bashrc file:
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export PS1="[\w] \$ "
And here is the value of my BASH_VERSION environment variable:
2.05b.0(1)-release
Does anyone know if the \w was deprecated?
If I have not provided enough information, please let me know
Any help would be appreciated, Thanks
Pete
03-28-2004, 07:26 PM
#2
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,627
It's all good, you just coincidently happen
to be in your home directory, which, in the
shells abbriviations, is ~ ... try a cd /usr
;)
Cheers,
Tink
03-28-2004, 07:53 PM
#3
LQ Newbie
Registered: Mar 2004
Posts: 2
Original Poster
Rep:
DOH! lol.
Thanks Tink
03-28-2004, 08:39 PM
#4
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,627
Pleasure mate :}
And sorry, I didn't welcome you!
Welcome to LQ, I usually don't overlook the post-number :}
Cheers,
Tink
03-28-2004, 09:21 PM
#5
Member
Registered: Aug 2003
Location: Chapel Hill, NC
Distribution: Gentoo, Windows 95 2000 & XP
Posts: 160
Rep:
I always find this site useful:
Prompt Magic
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 02:08 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News