try this script from the documentation ..this might help you :
PS1 – The value of this parameter is used as the primary prompt string. The default value is \u@\h \W\$ .
$ echo $PS1 Sample output: [\u@\h \W]$
\a : an ASCII bell character (07)
\d : the date in “Weekday Month Date” format (e.g., “Tue May 26”)
\e : an ASCII escape character (033)
\h : the hostname up to the first ‘.’
\H : the hostname
\j : the number of jobs currently managed by the shell
\l : the basename of the shell’s terminal device name
\n : newline
\r : carriage return
\u : the username of the current user
\v : the version of bash (e.g., 2.00)
\V : the release of bash, version + patch level (e.g., 2.00.0)
\w : the current working directory, with $HOME abbreviated with a tilde
\W : the basename of the current working directory, with $HOME abbreviated with a tilde
Examples:
PS1="\d \h $ " Sample output: Sat Jun 02 server $
PS1="[\d \t \u@\h:\w ] $ " Sample output: [Sat Jun 02 14:24:12 vivek@server:~ ] $