A Bash prompt should show enough context to keep commands in the right directory and on the right host. The PS1 variable controls that prompt, so a small change can show the user, host, working directory, and a visual marker before each command.
Bash expands prompt escape sequences such as \u, \h, \w, and \$ each time it draws the prompt. Color sequences also work, but nonprinting terminal codes need \[ and \] markers so command-line editing keeps the cursor position aligned.
A temporary assignment is safest for testing because it affects only the current shell. A persistent prompt belongs in ~/.bashrc for interactive Bash sessions, after any existing PS1 assignment that would otherwise override it.
$ PS1='[work] \u@\h:\w\$ ' [work] user@host:~$
\u shows the user, \h shows the short host name, \w shows the working directory, and \$ changes to # when the shell is running as root.
$ PS1='\[\e[1;32m\][work]\[\e[0m\] \u@\h:\w\$ ' [work] user@host:~$
The \e[1;32m sequence starts bold green text, and \e[0m resets the terminal style.
$ exec bash
This replaces the current shell and reloads the normal startup files.
$ cp ~/.bashrc ~/.bashrc.bak
A broken startup file can make new interactive shells hard to use until the prompt line is fixed or removed.
$ nano ~/.bashrc
PS1='\[\e[1;36m\]\u@\h:\w\$\[\e[0m\] '
Place the line after any existing PS1 assignment so the new value is the one Bash keeps.
$ bash -n ~/.bashrc
No output means Bash parsed the file without finding a syntax error.
$ source ~/.bashrc
$ bash --noprofile --rcfile ~/.bashrc -i -c 'printf "%s\n" "$PS1"' 2>/dev/null \[\e[1;36m\]\u@\h:\w\$\[\e[0m\]
This verification starts Bash with the saved startup file and prints the raw PS1 value instead of drawing a full interactive prompt.