Paste this code above that "if" block: Now that you have this prepared, you can design your own prompt. The line for this prompt is located just below the "else" line of the previously mentioned statement.
Comment out the default PS1 that's already there by typing a hash mark ( The primary prompt is more complicated.
Every pair of hexadecimal digits stands for a byte, which in the case of ASCII encoding stands for a character.
If you have difficulties using the terminal because the prompt isn't visible enough or you would simply like to customize its appearance, this howto is for you.
In this "if" block, the first PS1 is the prompt that will be shown when color is turned on, and the second one (after "else") is used when no color is desired.
As you can see, color codes are quite tiring to use.
Please visit this page to clear all LQ-related cookies.
You can find a list of those special characters in bash's man page under section PROMPTING: (the $ or # symbol, depending on your privileges).
I find this is clean way then setting up or updating path variables under each user profile unless it is mandatory.
This is clean way for sandbox setup at least not for production though.
Common uses for ~/.bash_profile are to set environment variables such as PATH, JAVA_HOME, create aliases for shell commands and set the default permissions for newly created files etc.
The file ~/.bashrc is similar, with the exception that .bash_profile runs only for Bash login shells and .bashrc runs for every new Bash shell.
Welcome to Linux Questions.org, a friendly and active Linux Community. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration.