Atuin replaces your shell history with a SQLite database, providing better search, sync across machines, and detailed statistics. It’s magical for finding that command you ran three weeks ago.

Installation

Quick install (recommended):

curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh

Arch Linux:

sudo pacman -S atuin

Shell Integration

Add to your shell config:

Bash (~/.bashrc):

eval "$(atuin init bash)"

Zsh (~/.zshrc):

eval "$(atuin init zsh)"

Fish (~/.config/fish/config.fish):

atuin init fish | source

Usage

Press Ctrl+r (or Up with config) to open the interactive search:

  • Type to filter
  • Enter to execute
  • Tab to edit before running
  • Ctrl+r to cycle through filter modes

Filter modes

ModeDescription
GlobalAll history across machines
HostCurrent machine only
SessionCurrent shell session
DirectoryCommands run in this directory

Commands

# Search from CLI
atuin search "docker"
 
# Show stats
atuin stats
 
# Manual sync
atuin sync

Sync Setup (Optional)

Register for free sync:

atuin register -u <username> -e <email>
atuin login -u <username>
atuin sync

Or self-host the sync server.

Configuration

~/.config/atuin/config.toml:

[settings]
# Use up arrow for atuin instead of ctrl+r
keymap_mode = "vim-normal"
 
# Search mode: prefix, fulltext, fuzzy
search_mode = "fuzzy"
 
# Filter by default
filter_mode = "host"
 
# Show preview of full command
show_preview = true
 
# Sync settings
auto_sync = true
sync_frequency = "5m"

Tips

  • Atuin stores history in ~/.local/share/atuin/history.db
  • Use atuin history list to export/inspect
  • Prefix sensitive commands with a space to exclude from history