Using tmux on iPhone: Keep Sessions Alive (2026 Setup)
Run tmux on your Mac to keep your terminal session alive. Your iPhone attaches to it with tmux attach -t claude, and everything is still running where you left it.
You need Remote Login on, tmux installed, and a way to reach your Mac's terminal from your phone. Macky is one way to get that terminal on your iPhone. The steps below also work with any SSH app.
How tmux on iPhone works
A terminal multiplexer like tmux lets your Mac and your iPhone attach to the same terminal session. Start an agent like Claude Code at your desk, then check on it from your phone.
If the connection drops, the session keeps running on the Mac. You attach again later and pick up where you left off.
Set up tmux on your Mac and iPhone
- On your Mac, turn on System Settings > General > Sharing > Remote Login.
- Install tmux on the Mac.
- Start a named session (command below).
- Run Claude Code or any long job inside that session.
- On your iPhone, connect to your Mac over SSH. One popular guide uses Tailscale: sign in on iOS, then use your Mac's Tailscale name as the host.
- Attach to the session (command below).
Start the session on the Mac:
tmux new -s claudeAttach from your iPhone:
tmux attach -t claudeOne author's Termius guide uses a startup command that attaches automatically and creates the session if it's missing:
tmux attach -t cc || tmux new -s ccFix scrolling in tmux on iPhone
On a phone, swiping often scrolls through past commands instead of the output. Turn on mouse mode to fix it. Run these on the Mac:
echo "set -g mouse on" >> ~/.tmux.conftmux source-file ~/.tmux.confWithout mouse mode, use copy mode. Press Ctrl+b, then [, then use the arrow keys to move through the output.
Open your Mac's tmux from your iPhone
Macky puts your Mac's terminal and screen on your iPhone. The connection is end-to-end encrypted and needs no open ports.

You can run tmux attach -t claude in the terminal like on any Mac. Closed-lid access works, so a MacBook doesn't need to stay open. For a deeper look at the terminal side, read How to Control Mac Terminal from iPhone.
Dedicated tmux apps for iPhone
Several iOS apps are built around tmux. They connect over SSH and attach to your sessions.
| App | Runs on | Notes |
|---|---|---|
| Remux | iPhone | Open source (MIT), built on Ghostty, direct SSH with no relay or account. Public TestFlight beta. |
| Tmux Term | iPhone | Password and private-key auth (ed25519, RSA). |
| iTmux | iPhone, iPad, Mac | Uses tmux control mode. Sessions, windows, and panes appear as native UI. |
| Multiplex | iPhone, iPad | Open source. Supports herdr and lists mosh. |
| Term | iPhone | Open source. Speaks mosh and SSH, with tmux on the host as the session store. |
Limits to expect
Your Mac has to stay reachable for the session to be useful. See caffeinate on Mac for keeping it awake.
The iPhone screen is small, even with mouse mode on. One author calls the phone a remote control for the session. Use it to check on agents and answer prompts. For other ways to run agents from your phone, see Claude Code on iPhone and Best iOS SSH Clients.
FAQ
Is it possible to SSH from an iPhone?
Yes. Turn on Remote Login on your Mac, then connect from an SSH app on your iPhone. See How to SSH Into Your Mac from Your iPhone for the full steps.
Does tmux keep running when I close the app on my iPhone?
Yes. Detaching or losing the connection leaves the session running on the Mac. Attach again with tmux attach -t claude and your work is still there.
Why won't tmux scroll on my iPhone?
Swiping scrolls through past commands unless mouse mode is on. Add set -g mouse on to ~/.tmux.conf. You can also use copy mode: press Ctrl+b, then [, then the arrow keys.
Is there a tmux app for iPhone?
Yes. Several iOS apps attach to tmux sessions. Examples are Remux and iTmux. Remux is open source and connects directly over SSH. iTmux uses tmux control mode. Sessions, windows, and panes show as native UI.
Related Guides & Comparisons
Try Macky
Connect to your Mac terminal from your iPhone.