Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-17-2004, 02:51 PM   #1
Registered: Apr 2004
Distribution: Gentoo
Posts: 65

Rep: Reputation: 15
display path's in the shell

when im useing a shell how do i make it so that it displays the path to the left of where i type instead of just saying "bash-2.05b$"?
Old 08-17-2004, 03:01 PM   #2
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
in your .bashrc or whatever file, you'll do something like this:

PS1="\w > "

man bash for more info on PS1 and the items you can use.

You could probably do a

$ PS1="\w > "
and that would chagne it for you, but thta won't do it every time you log in.
Old 08-17-2004, 03:11 PM   #3
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
This is the prompt I use:
PS1="\[\033[0;31m\]\u - \d \t\n\w> \[\033[0m\]"

You can have it load each time you login by putting it in ~/.bash_profile or for all users /etc/bashrc or /etc/profile depending on your distro.
Old 08-17-2004, 04:55 PM   #4
Senior Member
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 61
This link will tell you more.

Old 08-17-2004, 06:01 PM   #5
Registered: Apr 2004
Distribution: Gentoo
Posts: 65

Original Poster
Rep: Reputation: 15
i tryed that but whenever i open an xterm or something it's still the same as it was. what all files do i have to edit?


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
Problem withChanging DISPLAY environment variable to display on someone else's screen wantsri Linux - Networking 1 10-25-2005 12:14 PM
series-Write a single shell command to display the following output ricki Programming 2 07-31-2005 04:53 PM
How do I display real shell script output to web page. farmerjoe Programming 1 04-07-2005 02:03 PM
How do I make PHP display output from my shell script? farmerjoe Programming 2 04-03-2005 02:15 PM
Mandrake 10 changing display modes from shell. bobo_snyder Linux - Newbie 1 03-27-2005 08:38 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:34 AM.

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