LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-16-2003, 02:23 AM   #1
ashesh
Member
 
Registered: Feb 2003
Location: Kharagpur
Distribution: RH8, RH9, FC2
Posts: 112

Rep: Reputation: 15
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
 
Old 04-16-2003, 02:37 AM   #2
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591

Rep: Reputation: 32
man bash
search for PS1 and next PS..
 
Old 04-16-2003, 02:44 AM   #3
ashesh
Member
 
Registered: Feb 2003
Location: Kharagpur
Distribution: RH8, RH9, FC2
Posts: 112

Original Poster
Rep: Reputation: 15
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]$
 
Old 04-16-2003, 03:33 AM   #4
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
Some prompt 1337ness:

http://www.linuxquestions.org/questi...highlight=1337




Also check out:
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/
 
Old 04-16-2003, 03:53 PM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Blog Entries: 4

Rep: Reputation: 78
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.
 
Old 04-16-2003, 07:14 PM   #6
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Rep: Reputation: 30
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.
 
  


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
change the shell prompt ust Linux - Distributions 5 04-28-2005 04:26 PM
how to change login prompt ChronusDark Linux - General 2 03-03-2005 02:34 AM
change the boot prompt alaios Linux - Newbie 1 07-30-2004 11:23 PM
How can I change the terminal prompt? ICO Slackware 4 02-15-2004 09:09 AM
how to change my prompt ? lzg8056 Linux - Newbie 14 11-30-2003 10:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:30 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
Open Source Consulting | Domain Registration