tmux Sessions Survive Desktop Logouts

tmux-session-running-date.png

Just realised another cool reason for using tmux even for local sessions on my Dell XPS laptop with Linux Mint 19: tmux sessions will survive desktop logouts! I started a basic loop reporting current timestamp every second and it hasn’t interrupted at all even though I logged out form Gnome and then got back in.

I’m still tweaking Linux Mint desktop and need to log out from time to time. I mostly worked on local projects in the past few days and had Terminal tabs instead of tmux managing my sessions. One of these times I logged out I lost output in about 10 separate tabs of various stages of progress on the same mini project. Not cool!

Turns out, tmux survives graphical environment log out – which means I’m not going to lose anything unless I reboot laptop or something like that. This is one of the fundamental features of tmux, but somehow I’ve been forgetting to use it for local laptop work.

See Also