- Common aliases - Distro-specific aliases - Shell prompt - README
Bash Dotfiles
System-wide bash
Shell Configurations!
Features
- Centralized - All configs in
/etc/bash/
. - System-wide - Common configs for all users.
- Modular structure - Split by function (aliases, prompts, etc.)
- OS-aware aliases - Distro-specific aliases for appropriate package manager commands.
- Colors! - Use of colors where possible.
How to use
- Clone this repo to
/etc
.
git clone https://git.candifloss.cc/candifloss/dotfiles_bash.git /etc/bash
- Add this to the end of
/etc/bash.bashrc
:
if [ -d /etc/bash ]; then # Check if the dir exists
for file in /etc/bash/*.sh; do # Include all the files in the dir
if [ -r "$file" ]; then # Check if the file exists
. "$file"
fi
done
fi
File structure
/etc/bash/ # `mkdir` or `git clone` to this directory
├── bash_alias_common.sh # Common aliases
├── bash_alias_distro.sh # Distro-specific aliases
├── bash_prompt.sh # Shell prompt
├── LICENSE # Repo license
└── README.md # This file
Trouble-shooting
-
Alias not working?
Runalias | grep <command>
to find overrides -
Settings over-ridden?
These files can override your aliases and other settings (check in order):/etc/profile
/etc/bash.bashrc
~/.bash_profile
~/.bash_login
~/.profile
~/.bashrc
-
Permission errors
sudo chmod -R 755 /etc/bash
-
Debug Loading Order
Check which files are loadedbash --login --verbose --norc 2>&1 | grep -E '^\+.*\. '
-
Colors missing?
Check theTERM
variables and your terminal's capabilities.
Languages
Shell
100%