Personal dotfiles for Linux, macOS, FreeBSD, and OpenBSD, installed as symlinks with OS overlays.
git clone https://github.com/OleksandrChekhovskyi/dotfiles ~/source/dotfiles
cd ~/source/dotfiles
./install.shExisting files move to ~/.dotfiles-backup/<timestamp>/; reruns skip correct symlinks.
home/mirrors$HOMEand contains shared files.home.macos/,home.linux/,home.freebsd/, andhome.openbsd/are optional overlays.- An overlay file replaces the corresponding shared file on that OS.
For example, home.freebsd/.config/example overrides home/.config/example on FreeBSD.
The shell files are split by responsibility:
| File | Role |
|---|---|
~/.profile |
Login environment: PATH, EDITOR, ENV, and local environment |
~/.shrc |
Interactive settings shared by Bash, FreeBSD sh, and OpenBSD ksh |
~/.bashrc |
Bash-only history, bindings, and local interactive configuration |
~/.bash_profile |
Bash login bridge that loads .profile and .bashrc |
Typical loading paths are:
Bash login: .bash_profile -> .profile + .bashrc -> .shrc
Bash interactive non-login: .bashrc -> .shrc
FreeBSD/OpenBSD login: .profile -> .shrc through ENV
BSD interactive non-login: .shrc through inherited ENV
Non-interactive scripts normally load none of these files.
Put exported environment variables, paths, and secrets in ~/.profile.local:
export ANTHROPIC_API_KEY='...'
export OPENAI_API_KEY='...'Protect files containing secrets:
chmod 600 ~/.profile.localUse ~/.bashrc.local only for machine-specific Bash aliases, functions, or bindings.
Neither local file is tracked.
The hostname is bright white by default; set an ANSI SGR color in ~/.profile.local:
export DOTFILES_PROMPT_HOST_COLOR='1;31' # bright redCommon values include blue (1;34), magenta (1;35), and cyan (1;36). Exported shell
variables are inherited by child processes; system services need environment configuration through
their service manager instead.