Linux: Bash Notes
Just some notes to myself, I can never remember what to put where:
- ~/.profile - this is a useful place to define and export environment variables and bash functions that will be used by bash and the programs invoked by bash. It is a good place to redefine PATH if needed. We recommend adding a ":." to the end of PATH to also search the current working directory (contrary to DOS, the local directory is not searched by default). Also to avoid delays you should either unset MAILCHECK or define MAILPATH to point to your existing mail inbox.
- ~/.bashrc is executed each time an interactive bash shell is launched. It serves to define elements that are not inherited through the environment, such as aliases.
- ~/.bashrc is not called automatically for login shells. You can source it from .profile.
- ~/.inputrc controls how programs using the readline library (including bash) behave. Consider putting this in the file.
# Ignore case while completing
set completion-ignore-case on
# Make Bash 8bit clean
set meta-flag on
set convert-meta off
set output-meta on