Using Dotfiles
Note
Do not run the install script with sudo. Aliases and functions can be used with sudo if you want to.
Some helpful dotfiles for your system.
Requirements
- Shell:
bashorzsh - Package manager:
apt,dnf,yum,pacman, or Homebrew (brew) - Internet access (the script will install basic tools if needed)
The installer ensures curl and git are present by using your package manager.
Installation
Clone the repository:
git clone https://github.com/akshaybabloo/dotfiles.git && cd dotfilesThen run the bootstrap script:
./bootstrap.shThis will:
- Detect your shell and rc file (
~/.bashrcor~/.zshrc). - Back up your rc file (e.g.,
~/.bashrc.backup.YYYYMMDD_HHMMSS). - Append a small snippet to source the dotfiles main entry (
.main). - Detect your package manager and install
curlandgitif they're missing. - Offer to run the updater to install and update CLI binaries via
binstallusing configs inbinary_configs/.
When it completes, restart your terminal or source your rc file to load the changes.
Verify
After installation, reload your shell and list available commands:
# reload current shell session
source ~/.bashrc # or: source ~/.zshrc
# see provided commands and aliases
dotlsUpdating binaries later
You can re-run the updater any time to install or update the configured binaries.
dotuIf ~/bin is not on your PATH, the updater will add it to your shell rc.
What gets changed
The installer adds these lines to your shell rc:
# Gollahalli Dotfiles
. "/path/to/cloned/dotfiles/.main"It also creates a timestamped backup of your original rc file in the same directory just in case anything goes wrong.
On macOS, if you use bash and only have ~/.bash_profile, the script will remind you to source ~/.bashrc from it. Add this to ~/.bash_profile if prompted:
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fiUninstall
- Restore your rc backup or remove the added lines manually.
- Restore backup (example):
- Move or copy
~/.bashrc.backup.YYYYMMDD_HHMMSSback to~/.bashrc(or the zsh equivalent).
- Move or copy
- Or edit your rc file and delete the block:sh
# Gollahalli Dotfiles . "/path/to/cloned/dotfiles/.main"
- Open a new terminal or
sourceyour rc file. - Optionally, remove the cloned
dotfilesdirectory.
Troubleshooting
- “Do not run this script as root!” — Run
./bootstrap.shas your regular user; you can still usesudofor commands later. - “Unsupported shell” — Only bash and zsh are supported.
- “No supported package manager found” — Install
curlandgitmanually, then re-run the script. - “Dotfiles are already installed in rc” — The installer will ask whether to reinstall; choose
Yesto re-append orNoto keep as-is. dotls: command not found— Reload your shell:source ~/.bashrcorsource ~/.zshrc, or open a new terminal.- Binaries not available on PATH — Run
./updater.sh; it ensures~/binis on PATH.
If you hit something unexpected, feel free to file an issue on the repository.