To change the Linux Bash prompt to a different format, simply set the PS1 variable
PS1="new prompt text"
There are several options that you can use to show different things
|\h||short Hostname – up to the first “.”|
|\w||current full path|
|\d||the date in in “Weekday Month Date” format|
|\t||the current time in 24-hour HH:MM:SS format|
|\T||the current time in 12-hour HH:MM:SS format|
|\@||the current time in 12-hour am/pm format|
The most common is
which gives the user name, hostname and current path.
To make this pernament, you need to add it to any one of the startup script files, the most common places are