LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-19-2003, 08:09 PM   #1
Penguin666
LQ Newbie
 
Registered: Nov 2003
Location: Montreal Canada
Distribution: Mandrake 9.2
Posts: 17

Rep: Reputation: 0
pwd


How does one incorporate the "pwd" into there shell prompt.

so instead of seeing:
[root@PENGUIN666 tss]#

you would see:
[root@PENGUIN666 /home/tss]#

Thank you.
 
Old 11-19-2003, 08:54 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Instead of using \w I believe it would be a capital W like:

PS1='\u@\h\W\$ '

One reason I wouldn't want the full path instead of the current directory is if or when your in a say a sub directory so deep, your prompt is only going to get longer.

Say you cd'd into: /usr/local/bin/blah/blah/blah

Your prompt is going to reflect that.

man bash for all your options in setting up your prompt.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing a users pwd ALInux Linux - Newbie 1 11-07-2005 01:44 PM
reset pwd to root's current pwd? ataraktos2 Linux - General 10 04-26-2005 05:13 AM
changed pwd tekmorph Linux - Security 5 09-15-2004 10:47 PM
pwd problem naren Programming 1 04-01-2004 05:52 AM
pwd and the directory above sneezesnoeze Linux - Newbie 3 03-26-2004 08:18 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration