# 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 1. Clone this repo to `/etc`. ```bash git clone https://git.candifloss.cc/candifloss/dotfiles_bash.git /etc/bash ``` 2. Add this to the end of `/etc/bash.bashrc`: ```bash 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? Run `alias | grep ` to find overrides - Settings over-ridden? These files can override your aliases and other settings (check in order): 1. `/etc/profile` 2. `/etc/bash.bashrc` 3. `~/.bash_profile` 4. `~/.bash_login` 5. `~/.profile` 6. `~/.bashrc` - Permission errors ```bash sudo chmod -R 755 /etc/bash ``` - Debug Loading Order Check which files are loaded ```bash bash --login --verbose --norc 2>&1 | grep -E '^\+.*\. ' ``` - Colors missing? Check the `TERM` variables and your terminal's capabilities.