Active Member
Jul 23, 2005
I just bought a secondary dedicated server, however in the SSH it displays the location as something like [[email protected]] as opposed to how its displayed in my other server as something like [[email protected]/location/to/my/location]. I like this second format because I like to see where I am. I was wondering how to set my new server's SSH to format the cmd line like that. It's very possible this has already been answered on the forums, but i did't really know what to search for.


Jun 25, 2005
cPanel Access Level
Root Administrator
On command line type:
# PS1="[\[email protected]\h \w]\\$ "
Here's a list you can use for the prompt:
\a	The ASCII bell character (you can also type \007)
\d	Date in "Wed Sep 06" format
\e	ASCII escape character (you can also type \033)
\h	First part of hostname (such as "mybox")
\H	Full hostname (such as "mybox.mydomain.com")
\j	The number of processes you've suspended in this shell by hitting ^Z
\l	The name of the shell's terminal device (such as "ttyp4")
\n	Newline
\r	Carriage return
\s	The name of the shell executable (such as "bash")
\t	Time in 24-hour format (such as "23:01:01")
\T	Time in 12-hour format (such as "11:01:01")
\@	Time in 12-hour format with am/pm
\u	Your username
\v	Version of bash (such as 2.04)
\V	Bash version, including patchlevel
\w	Current working directory (such as "/home/drobbins")
\W	The "basename" of the current working directory (such as "drobbins")
\!	Current command's position in the history buffer
\#	Command number (this will count up at each prompt, as long as you type something)
\$	If you are not root, inserts a "$"; if you are root, you get a "#"
\xxx	Inserts an ASCII character based on three-digit number xxx (replace unused digits with zeros, such as "\007")
\\	A backslash
\[	This sequence should appear before a sequence of characters that don't move the cursor (like color escape sequences). This allows bash to calculate word wrapping correctly.
\]	This sequence should appear after a sequence of non-printing characters.