How to use Atuin for shell history: install, optional sync, Ctrl+R search, import bash/zsh
Install Atuin, init your shell, search history with Ctrl+R; sync only if you want multi-device backup.
New machine, new tab — yesterday's long docker compose or kubectl one-liner is gone. Atuin stores shell history in a local SQLite database, replaces Ctrl+R with a searchable UI, and optionally syncs encrypted history when you register an account.
Searchers looking for Atuin shell history install sync Ctrl+R import bash zsh need: install the CLI, atuin import auto for legacy history, eval "$(atuin init zsh)" in the rc file, then search with Ctrl+R. Sync via atuin register / atuin sync is optional. Steps follow docs.atuin.sh.
Who Atuin is for
Devs on many tabs and hosts
Filter by directory, host, or time instead of scrolling a flat HISTFILE.
People keeping old bash/zsh history
atuin import auto pulls existing history once; new commands go to Atuin afterward.
Optional multi-device sync
Register for end-to-end encrypted sync, or stay local-only with no account.
Install Atuin (macOS / Linux)
- 1
Official installer
Run the Getting Started install command from the docs, e.g.
bash <(curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh). Open a new terminal and confirmatuin --version. - 2
macOS: Homebrew
brew install atuinis documented for Homebrew users. Avoid undocumented third-party bundles. - 3
Linux packages
Some distros ship community packages; follow the install page for cargo/apt/etc., then verify with
atuin --version. - 4
Import bash/zsh history
atuin import autoimports from the current shell's history file. Back up~/.bash_historyor your zshHISTFILEfirst. Large files may take a few seconds.
Shell hook and Ctrl+R search
Atuin must initialize in the shell to record commands and bind Ctrl+R:
# zsh (~/.zshrc)
eval "$(atuin init zsh)"
# bash (~/.bashrc)
eval "$(atuin init bash)"
# fish (~/.config/fish/config.fish)
atuin init fish | sourcesource the rc file or restart the terminal. Run a few commands, press Ctrl+R, and filter the list. Enter inserts the pick.
Optional: account and encrypted sync
- 1
Local-only
No registration required to search on this machine.
- 2
Register or log in
atuin registeroratuin loginper the docs. Read the privacy and key-handling notes before enabling cloud sync. - 3
Sync manually
atuin syncuploads and pulls encrypted history (see the Sync chapter). Do not print tokens in logs. - 4
Self-host (advanced)
Docs cover a self-hosted sync server for teams with data-residency requirements.
| Command | Action | When |
|---|---|---|
atuin search | Search from the CLI | Scripts, no TUI |
atuin stats | Usage stats | Workflow review |
atuin import auto | Import bash/zsh history | After first install |
atuin sync | Encrypted sync (account) | Multi-device |
Atuin manages command history, not secrets management. Commands with tokens may still be stored — use shell ignore rules and a proper secret store for sensitive work.
To pair on a long deploy command, open a browser room from the wbroom homepage — create and join a room.
Questions worth checking
Atuin vs fzf on Ctrl+R?
Both bind Ctrl+R; the last hook wins. Pick Atuin for database history or fzf for plain HISTFILE search — rebind keys in the docs if needed.
Import count looks wrong?
Check the source HISTFILE and zsh shared-history settings. Re-run atuin import auto or import a specific file per the docs.
Where is local data stored?
A SQLite database under your user config path — see the official FAQ. Back it up with the rest of your dotfiles.
fish or other shells?
Docs list atuin init for fish and others. Unsupported shells may only get atuin search without automatic recording.