LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-28-2010, 11:26 AM   #1
sharky
Member
 
Registered: Oct 2002
Posts: 569

Rep: Reputation: 84
bash prompt question


bash is my default shell, mandated by our IT dept, and I have PS1 set as follows;

PS1="\d \@ [ \u on \h ]\n\w\n> "

The \w returns the current working directory. When I'm in my home directory it's returned as "~" which is OK but I was wondering, is there a way to get it to return as /home/myaccount?
 
Old 05-28-2010, 11:43 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Try substituting \$(pwd) for \w
 
Old 05-28-2010, 11:49 AM   #3
sharky
Member
 
Registered: Oct 2002
Posts: 569

Original Poster
Rep: Reputation: 84
Thanks tredegar, that worked.
 
  


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
Bash prompt Hoofty Linux - General 1 03-15-2006 04:54 PM
bash prompt subG Slackware 6 01-18-2006 04:43 PM
Curious bash prompt editing question. xconspirisist Linux - Software 3 11-19-2005 07:24 PM
Question about bash prompt sangjin Linux - Newbie 2 07-30-2003 02:08 AM
Bash Prompt Question ghight *BSD 6 01-31-2003 12:30 PM

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

All times are GMT -5. The time now is 10:38 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