LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 03-28-2004, 07:19 PM   #1
Blade_Powers
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
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
 
Old 03-28-2004, 07:26 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 03-28-2004, 07:53 PM   #3
Blade_Powers
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Original Poster
Rep: Reputation: 0
DOH! lol.

Thanks Tink
 
Old 03-28-2004, 08:39 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Pleasure mate :}


And sorry, I didn't welcome you!

Welcome to LQ, I usually don't overlook the post-number :}




Cheers,
Tink
 
Old 03-28-2004, 09:21 PM   #5
statmobile
Member
 
Registered: Aug 2003
Location: Chapel Hill, NC
Distribution: Gentoo, Windows 95 2000 & XP
Posts: 160

Rep: Reputation: 30
I always find this site useful:
Prompt Magic
 
  


Reply



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
changing the BASH shell prompt 24jedi *BSD 12 03-01-2005 03:11 AM
Changing Bash Prompt socks Slackware 11 02-09-2005 06:32 PM
changing the way the bash prompt shows up Quartzophobia Linux - General 10 02-15-2004 02:37 PM
Changing the BASH prompt? Dravis Linux - Software 2 01-22-2004 09:17 PM
Changing the command prompt in bash george3k Linux - General 4 07-11-2001 08:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:36 PM.

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