LinuxQuestions.org
Help answer threads with 0 replies.
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, 12:26 PM   #1
sharky
Member
 
Registered: Oct 2002
Posts: 496

Rep: Reputation: 62
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, 12:43 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,087

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
Try substituting \$(pwd) for \w
 
Old 05-28-2010, 12:49 PM   #3
sharky
Member
 
Registered: Oct 2002
Posts: 496

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


Reply


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

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

All times are GMT -5. The time now is 06:55 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration