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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-16-2003, 02:23 AM
|
#1
|
Member
Registered: Feb 2003
Location: Kharagpur
Distribution: RH8, RH9, FC2
Posts: 112
Rep:
|
how to change prompt
When i open terminal or xterm the prompt shown is:
bash-2.05b $
How can I make it display the exact location where I am... that is I would like it to show me:
/ashesh/programs/ $ when I am in programs folder
|
|
|
04-16-2003, 02:37 AM
|
#2
|
Member
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591
Rep:
|
man bash
search for PS1 and next PS..
|
|
|
04-16-2003, 02:44 AM
|
#3
|
Member
Registered: Feb 2003
Location: Kharagpur
Distribution: RH8, RH9, FC2
Posts: 112
Original Poster
Rep:
|
Actualy, I would like the prompt to be as follows:
where 1st ashesh is loginname and 2nd ashesh is the folder name...
[ashesh@ecl5 ashesh]$
|
|
|
04-16-2003, 03:33 AM
|
#4
|
Member
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358
Rep:
|
|
|
|
04-16-2003, 03:53 PM
|
#5
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
Here's what you want. To make it permanent throw it in ~/.bashrc
PS1="[\u@\h \W]$ "
If you like here's another. It is pretty much the same except it has a nicely formatted timestamp and it is blue:
PS1="\[\033[1;34m\][\$(date +%H:%M)][\u@\h \W]$\[\033[0m\] "
Last edited by bulliver; 04-16-2003 at 03:58 PM.
|
|
|
04-16-2003, 07:14 PM
|
#6
|
Member
Registered: Apr 2003
Distribution: RH 8
Posts: 246
Rep:
|
anyone have a good site explanine all this madness:
export PS1=" \[\033[1;30m\][\[\033[0;31m\][\[\033[1;31m\][\[\033[1;35m\]\u\[\033[1;37m\]@\[\033[1;35m\]\h\[\033[1
;37m\]:\[\033[1;31m\]\w\[\033[1;31m\]]\[\033[0;31m\]]\[\033[1;30m\]]\[\033[1;31m\]"
...
Last edited by sopiaz57; 04-16-2003 at 07:18 PM.
|
|
|
All times are GMT -5. The time now is 09:30 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|