| Version 4 (modified by , 15 years ago) ( diff ) |
|---|
Bash Shell
General Information (for the absolute beginner)
When logging in to a Bash shell, the machine finds and executes commands in /etc/profile, and will then search for .bash_profile, .bash_login, and .profile (in that order) in the login user's home directory. When exiting / loggin out, bash reads and executes ~/.bash_logout (if it exists).
(Will add more here...)
Tips and Tricks
I like to change the color, and structure, of my Bash prompt to make a more clear distinction between the area that I am typing and the prompt. A typical Bash prompt looks like user@machine:present working directory$ :
"Style"
I try to break up the content in my .bash_profile (for purely organizational reasons) into aliases, environment variables, and prompt manipulation. I store aliases in the file .alias, environment variables in .env and prompt manipulation in .prompt. In fact, my ~/.bash_profile really just looks like:
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
source .env
source .alias
source .prompt
- Adrian
Attachments (3)
- bash_prompt_default.png (6.4 KB ) - added by 15 years ago.
- bash_prompt_default.2.png (6.4 KB ) - added by 15 years ago.
- bash_prompt_color.png (6.4 KB ) - added by 15 years ago.
Download all attachments as: .zip
