As a developer who constantly switches between multiple machines—ranging from local laptops to remote servers—I’ve always struggled with one thing: remembering commands and managing security tokens. It’s a pain to juggle different environments, each with its own set of commands, aliases, and secrets. That was until I discovered Atuin, the magical shell history manager that changed everything.
What is Atuin?
Atuin is a tool that syncs your shell history across all your machines securely. It replaces your existing shell history with its own database, which is encrypted and can be synced across devices. This means you can run a command on your laptop, switch to a server, and still have access to that command in your history. It’s like having a universal memory for your terminal.
Getting Started with Atuin
Installation
The first step is to install Atuin. The process is straightforward and well-documented. Here’s how I did it:
On my primary machine (my laptop):
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
After installation, initialize Atuin:
atuin init bash # or `atuin init zsh` for zsh
Register your account to sync your history through different machines:
atuin register -u <YOUR_USERNAME> -e <YOUR EMAIL>
Get your key and keep it safe (i.e: essay pattern ...
)
atuin key
On a different machine (e.g., a server or another laptop):
Install Atuin using the same method:
curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh | sh
Initialize it:
atuin init bash
Log in with your existing account:
atuin login
You will be prompted for your password, and for your key.
Setting Up Encryption Key
Atuin uses symmetric encryption to secure your shell history. When you first set it up, it generates an encryption key that:
• Stays only on your machine(s) and is used to both encrypt and decrypt your history.
• Is never shared or uploaded!
Since the same key is required for both encryption and decryption, ensure you back it up securely. If lost, you won’t be able to access your synced history.
I quote the docs:
If you lose your key, we can do nothing to help you. We recommend you store this somewhere safe, such as in a password manager.
Syncing Across Machines
Once installed on all devices, syncing is automatic. Commands are encrypted locally and sent to Atuin’s server. When you switch machines, Atuin fetches and decrypts your history using your key. For example:
- Run
ssh mygreatremoteserver.supercloud.com
on your laptop. - SSH into a server and press Ctrl+R: the same command appears in your history.
No more frantic Googling or digging through old terminals!
Security and Self-Hosting
Atuin is secure by design:
- Your key never leaves your machine (and please be careful, do not share).
- All data is encrypted end-to-end.
For extra control, you can self-host the sync server (docs here). This keeps everything within your infrastructure, ideal for sensitive environments.
My Experience with Atuin
- Day 1-2: Felt odd seeing cross-machine history, but muscle memory adapted quickly. Also, your brain is not used to the new behaviour of the up key; feels weird at first.
- Today: My workflow feels seamless. No more
history | grep "that one flag"
across five terminals. Bonus point: colleagues are impressed.
Another bonus point: The logo is a cute turtle. 🐢
Conclusion
If you work across multiple machines, Atuin is a game-changer. It’s secure, easy to adopt, and eliminates the frustration of fragmented shell history. Plus, self-hosting options mean you’re always in control.
And it's not only the sync between devices that feels magical: the fact that you cannot loose your history between tabs, sessions or environment because everything is somehow centralised is also a huge game changer!
Give it a try—you’ll wonder how you ever worked without it.