Skip to content
/ ps1 Public

How to customize and colorize your Terminal/Bash Prompt

Notifications You must be signed in to change notification settings

yvonneyeh/ps1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Bash - Prompt String One

Common Special Characters

\d - the current date
\e - escape character
\h - the hostname
\n - a newline
\t - current time 24-hour HH:MM:SS
\T - 12-hour HH:MM:SS
\@ - 12-hour HH:MM am/pm
\u - username of current user
\w - path to current working directory

Colors

\[ - start of non-printing sequence
\] - end of non-printing sequence

Black: \e[30m
Blue: \e[34m
Cyan: \e[36m
Green: \e[32m
Magenta: \e[35m
Red: \e[31m
White: \e[37m
Yellow: \e[33m

To reset the color, use \e[00m

About

How to customize and colorize your Terminal/Bash Prompt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages