Customizing the Bash Environment
Bash History Customization
export HISTCONTROL=ignoredups
export HISTIGONE="&:ls:[bf]g:exit:history"
export HISTTIMEFORMAT='%F % T '
Alias
- Set a new alias:
alias las='ls -al'
- To list all aliases just type
alias
Persistent Bash Customization
- System wide bash settings:
/etc/bash.bashrc
- These are overwritten by the user settings located in
~/.bashrc
echo "alias las='ls -al' " >> ~/.bashrc
Relevant Note(s): Linux Basics