Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
labs:custom_prompt [2009/09/24 18:06] – admin | labs:custom_prompt [2022/01/20 20:14] – [Color Codes] admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Customizing Your Terminal' | ====== Customizing Your Terminal' | ||
- | When executing | + | When executing |
- | | + | |
- | characters | + | |
You will need to edit your '' | You will need to edit your '' | ||
- | You will define a PS1 variable and export it. | + | You will define a '' |
- | MORE DIRECTIONS TO COME... | ||
===== Bash Escape Sequences ===== | ===== Bash Escape Sequences ===== | ||
+ | |||
+ | The allowed escape sequences allowed in the Bash prompt are decoded as follows: | ||
\a an ASCII bell character (07) | \a an ASCII bell character (07) | ||
Line 48: | Line 47: | ||
trol sequence into the prompt | trol sequence into the prompt | ||
\] end a sequence of non-printing characters | \] end a sequence of non-printing characters | ||
+ | ===== Color Codes ===== | ||
+ | |||
+ | |Black | ||
+ | |Red | ||
+ | |Green | ||
+ | |Brown | ||
+ | |Blue | ||
+ | |Purple | ||
+ | |Cyan | 0;36 | ||
+ | |Light Gray | 0;37 || White | ||
===== Examples ===== | ===== Examples ===== | ||
Line 56: | Line 65: | ||
PS1=' | PS1=' | ||
- | # With Color: | + | Look at the escape sequences above to help you determine what the above prompt description means. |
- | PS1=" | + | |
+ | '' | ||
PS1=" | PS1=" | ||
+ | |||
+ | This one would look like hostname: | ||
+ | |||
+ | **With Color: | ||
+ | |||
+ | PS1=" | ||
+ | |||
export PS1=" | export PS1=" | ||