I’ve been a Linux user for over a decade, managing a dedicated server over SSH where I ran game servers, a TeamSpeak, Plex, and so much more. As a result, I had to learn to get familiar with terminal multiplexers, and while tmux has been the go-to of many for years, I’ll admit that I find myself leaning towards screen for practically everything instead. After all, it’s modern, actively developed, and is packed full of features that make it phenomenal at what it does. But I still prefer screen.
tmux is genuinely better in a lot of different ways. It has a very logicial configuration with accessible documentation and intuitive pane management. If you’re working in a development environment, the time spent getting it working for you will likely pay off. But for server administration, quick remote tasks, or environments where you can’t install software, screen would always be my first port of call. It may seem like an obsolete tool, but it holds up well to this day, and these are the reasons I prefer it.
Simplicity is key
Table of Contents
It just works
My most-used Linux machine is a Ubuntu virtual machine that I access over RDP. I use Ghostty as my terminal, where I’ll open additional tabs rather than use a tool like tmux or screen. It’s quite rare that I need to run concurrent applications over an SSH connection, but that’s where screen really shines.
Because screen doesn’t have a lot of features, the cognitive load is significantly lower, and it’s easy to remember how to use it even if you haven’t used it in a long time. These are basically all of the commands you need to remember:
- screen: Start a session
- screen -r: Reattach to a session
- screen -ls: List your sessions
- Ctrl+A D: Detach
- Ctrl+A C: New window
- Ctrl+A N/Ctrl+A P: Next and previous window
And if you want a vertical screen split, all you need to remember are:
- Ctrl+A |: Vertical split
- Ctrl+A Tab: Change to other window
- Ctrl+A C: New shell
That’s genuinely it for most use cases, and I find myself sometimes going days, weeks, or even months without using it and still remembering how to use it. tmux, meanwhile, has more concepts you need to keep in your head. First, there are sessions, windows, and panes, and the attach command has multiple flags that all matter. Then there’s the configuration you set up months ago that you don’t remember.
There’s also something to be said for screen’s lack of features. You don’t look at a screen session and think “I need a better layout” or think about configuring it at all; you just use it. The power of tmux comes from the ability to tinker with it, and that’s great if that’s your thing. If it’s not, though, then it just feels like friction.
Ease of scripting and outputting results
Much shorter commands
As someone who used screen a lot for game servers and other background processes in the past, it was a lot nicer to start a new session in screen with some kind of script than it was tmux. If I want to start a detached session that runs a command in screen, here’s the command:
screen -dmS sessionName ./script.sh
In comparison, tmux requires the following:
tmux new-session -d -s sessionName './script.sh'
It may not seem like much, but it is a heavier syntax. And if you want to send keystrokes to a specific pane in tmux, you’re dealing with window.pane syntax and knowing the number of the pane, and the same goes for capturing output, where you need to use a save-buffer with its own flags to do it the “right way”, too. The “hacky” way to do it still looks something like this:
tmux capture-pane -t sessionName:1.2 -p -S -1000 > output.txt
In the above command, it’s -t for the target, -p for printing to stdout and -S for the start line (with a negative for scrollback). Whereas in screen, it’s just the following:
screen -S dev -p 2 -X hardcopy output.txt
If you want the full scrollback buffer, it’s just “hardcopy -h fileName” instead. tmux is better for precision, as you target exactly the right session, window, and pane. You capture the specific lines you want, and you name your save-buffers and manage them. screen takes the “good enough” approach, where you can target sessions and windows and dump the output. It feels like it’s covering 90% of needs with half the syntax.
Built in serial console support
Great for embedded devices
This is one that has only become relevant to me in more recent years, but screen can actually connect to a serial output out of the box. All you need to do is specify the location and the baud rate, and screen will handle the rest.
screen /dev/ttyUSB0 115200
If you work with embedded devices, like the ESP32 or anything else with a serial connection, this can be a game-changer. It’s a very simple way to keep tabs on outputs, without relying on external tools or websites to do it for you.
Most Linux machines will have screen preinstalled, meaning you can spin up a serial listener really easily out of the box. This then keeps the session active even when you detach, so you can easily check up on what a device is doing whenever you want without needing to reconnect.
It handles disconnects gracefully
“screen -dr” is your friend
If you’ve spent any amount of time managing servers over SSH, you’ll know that connections can drop. I’ve had it when managing servers over mobile data, but I’ve also had ISP outages and VPN issues cause problems, too. When that happens, screen tends to handle it without fuss. You reconnect, run screen -r (sometimes screen -dr instead) and you’re back where you were.
tmux’s client-server architecture can be fussier about this. You’ll sometimes get warnings about nested sessions, or need to use tmux attach -d to forcibly detach a stale client before you can reconnect. The simpler architecture of screen’s “one process, one session” approach means there’s less state to get confused. When things go wrong, screen -dr almost always sorts it out.
If your connection isn’t perfect, screen can be a lot nicer to deal with than tmux.
Both are still great
To reiterate: none of this is a knock against tmux, and in fact, it’s arguably the better tool overall. But the reasons I prefer screen are outlined here; it’s simpler, it’s easy, and it handles spotty connections nicely. If you’re someone who lives in a terminal every single day, tmux is a great option, especially if you’re doing a lot of complicated work in it. However, if you’re more of a casual terminal user, screen is more than enough to get the job done when the moment requires it. If you find tmux to be complicated, give screen a try and see if it suits your workflow better.
