Review your favorite Linux distribution.
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 06-19-2008, 01:36 PM   #1
LQ Newbie
Registered: Mar 2008
Posts: 12

Rep: Reputation: 0
shell appearance.

while working in shell when i am in home directory i get this prompt

when i change my directory my prompt changes something like this

i don't want this.

i want to get a simple prompt likethis

what should i do.
Old 06-19-2008, 01:51 PM   #2
LQ Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,864

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
You configure the bash prompt by the PS1 variable. You can set the prompt to hello with PS1=hello. This is explained in the bash man page under the PROMPT_COMMAND section.

You can make the prompt more elaborate by using escape characters and variables in PS1, for example:


will change the prompt to the name of your home directory. Use the command:


to see other variables that you could possibly use. Other things that you can include in your prompt are described in the bash man page under PROMPTING. For example:


Once you get PS1 the way that you want it you can make it permanent by placing it in a bash profile file under /home/user/. Different distributions use different bash profile files. Look for .bashrc, .bash_profile, or .profile.

Steve Stites
Old 06-19-2008, 02:41 PM   #3
Registered: Sep 2004
Location: Pennsylvania
Distribution: Gentoo, Suse, Fedora, Slackware
Posts: 56

Rep: Reputation: 15
You might want to use:


The capital W tells it to only use the base name of the current if you're in /etc/httpd you'd see user@host:httpd$.


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
Appearance multilingus SUSE / openSUSE 3 06-18-2006 07:27 AM
a few appearance questions Latem Mandriva 0 06-23-2005 09:06 AM
KDE Appearance Nullhellfire Slackware 4 03-27-2005 01:22 AM
mandrake appearance raffaello Linux - Software 1 10-24-2004 01:16 PM
IMAP questions: file locations, directory appearance, mail appearance alake Linux - Enterprise 1 04-29-2004 05:24 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:21 PM.

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