terminal:shell:bashrc
Table of Contents
bashrc and bash_aliases
Files: ~/.bashrc, ~/.bash_aliases
.bashrc
Executed for every interactive non-login bash shell. Key settings:
| Setting | Value | Purpose |
|---|---|---|
HISTSIZE | 10000 | Commands kept in memory |
HISTFILESIZE | 20000 | Commands kept on disk |
HISTCONTROL | ignoreboth | Skip duplicates and space-prefixed |
shopt -s histappend | on | Append to history, never overwrite |
shopt -s checkwinsize | on | Update LINES/COLUMNS after each command |
EDITOR | /usr/bin/micro | Default editor |
TZ | America/Edmonton | Timezone |
force_color_prompt | yes | Colored PS1 prompt |
Sources ~/.bash_aliases if it exists.
.bash_aliases
# Navigation alias ..='cd ..' alias ...='cd ../..' alias mkdir='mkdir -p' # Safety — prompt before overwriting alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Listing alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' # Git shortcuts alias gs='git status' alias ga='git add' alias gc='git commit' alias gp='git push' alias gl='git log --oneline' alias gd='git diff' # tilde.town alias irc='weechat-curses -r "/connect irc://$(whoami)@localhost/#tildetown"' alias ttbp='~/.ttbp/bin/ttbp' alias motd='cat /etc/motd'
Note on .profile.d/10-aliases.sh
The more advanced aliases (eza, bat, rg with availability checks) live in ~/.profile.d/10-aliases.sh and are loaded for login shells only.
See Also
terminal/shell/bashrc.txt · Last modified: by 127.0.0.1
