tmux on your phone: sessions that survive everything
Last updated:
A phone sleeps, switches from Wi-Fi to mobile data and loses signal in elevators. A plain SSH session dies each time. tmux keeps the work running on your computer, and your phone simply reattaches.
Start a session on the computer
tmux new -s work
Run your build, your test watcher or an AI agent inside it. Detach with Ctrl+b then d, or just close the laptop lid; the session keeps running on the machine.
Attach from your phone
Open RoamTerm, tap the machine and choose the tmux session from the list. RoamTerm attaches for you, so there is no command to type. If the connection drops, it reconnects quietly and lands you back in the same session.
Useful keys on a touch screen
The key row above the keyboard has Esc, Ctrl, Alt, Tab, arrows and the symbols that are hard to type on a phone: |, ~, / and -. With tmux:
Ctrl+bthenccreates a window,nandpswitch windows.Ctrl+bthen[enters scroll mode; use the arrow keys or page keys to scroll.Ctrl+bthenddetaches.
Good habits
- Name your sessions so they are easy to find in the list.
- Keep one session per project and let long jobs run inside it.
- Use the terminal font size setting for long logs; it is separate from the system text size.
Related: run Claude Code from your phone.