Previous | Home | Terminology | Next
Chapter 13 - Customizing The Prompt
The command: 'echo $PS1' on my Raspberry PI reveals the following:
Changing the look of the prompt may be an interesting way of making your Raspberry Pi your own!
Things I want to remember:
\u@\h
user@host
\w
name of current working directory
\[
start of one or more non-printing characters (such as colors)
\]
end of one or more non-printing characters (such as colors)
033
ANSI code for ESC key followed by option and attribute (look below)
The below tables are only for reference (no need to memorize them).
Escape Sequences Used To Set Text Color
Escape Sequences Used To Set Background Color
Cursor Movement Escape Sequences
1. Change the prompt of your RP so it shows starts with $ followed by a space.
2. Make sure that that this new prompt can survive reboot.
1. Change the prompt of your RP so it shows starts with $ followed by a space.
$ PS1="$ "
2. Make sure that that this new prompt can survive reboot.
Edit .bashrc file and add:
PS1="$ "
The command: 'echo $PS1' on my Raspberry PI reveals the following:
Things I want to remember:
\u@\h
user@host
\w
name of current working directory
\[
start of one or more non-printing characters (such as colors)
\]
end of one or more non-printing characters (such as colors)
033
ANSI code for ESC key followed by option and attribute (look below)
The below tables are only for reference (no need to memorize them).
Escape Sequences Used To Set Text Color
Lab 7
1. Change the prompt of your RP so it shows starts with $ followed by a space.
2. Make sure that that this new prompt can survive reboot.
Lab 7 Solution
1. Change the prompt of your RP so it shows starts with $ followed by a space.
$ PS1="$ "
2. Make sure that that this new prompt can survive reboot.
Edit .bashrc file and add:
PS1="$ "
Previous | Home | Terminology | Next