\T The time, in 12-hour HH:MM:SS The time, in 12-hour am/pm format. \s The name of the shell, the basename of $0 (the portion following
\l The basename of the shell's terminal device name. \j The number of jobs currently managed by the shell. bashrc/.bash_profile use grep 'PS1' $HOME/.bash Special prompt variable characters: \d The date, in 'Weekday Month Date' format (e.g., 'Tue May 26'). To see what is currently defined in your. This change can be made permanent by placing the export PS1 definition in your ~/.bashrc file. It is recommended not to use a " data-type="undefined" target="_blank">' in your PS1 Command Prompt as if copy/pasted by accident that can cause a redirection and file overwrite. Set your prompt by changing the value of the PS1 environment variable, as follows: If this variable is set and has a non-null value, then it will be executed just before the PS1 variable. PS4 – Prompt used when a shell script is executed in debug mode (“ set -x” will turn this on) default ='++' PS3 – Prompt used by “select” loop inside a shell script PS2 – Continuation interactive prompt (when a long command is broken up with \ at the end of the line) default=" data-type="undefined" target="_blank">' PS1 – Default interactive prompt (this is the variable most often customized) There are several variables that can be set to control the appearance of the bach command prompt: PS1, PS2, PS3, PS4 and PROMPT_COMMAND the contents are executed just as if they had been typed on the command line.