tmux vs screen Comparison

Most of the system administrators have at least once use a terminal multiplexer. There are numerous option built for the purpose, such as GNU screen, dvtm, mtm, neercs, tmux, Twin, byobu. Among them, the most popular ones are tmux and GNU screen.

In this article, we’ll compare tmux and screen so that you can make an educated choice when it comes to choosing a terminal multiplexer.

Differences Between tmux and screen

What is screen?

screen, or GNU screen is a hugely popular terminal multiplexer included or available in most of the Linux distro today. It was part of the GNU project and has been actively developed for the past 35 years.

screen is particularly useful when you’re connecting to a remote/local computer through an SSH connection. It allows you to create, close, detach and resume multiple “windows” without leaving the current session.

Most of screen functionalities are controled using key sequences. The command line interface for screen is screen.

What is tmux?

tmux is another terminal multiplexer, much more modern than GNU screen. It has been developed by Nicholas Marriott for the past 14 years and released under ISC license.

tmux supports most of the features you’re already familiar with in screen, plus more. Those features includes running multiple CLI program at the same time, attach/detach sessions without leaving the main one, keeping detached sessions running in the background without being visible. There are other advanced features that we’re going to discuss below.

tmux is bundled with the OpenBSD family, and available as a package on most major Linux distributions.

Key Differences Between tmux and screen

tmux is the newer program, so it’s obvious that it has way more features (in terms of numbers) than screen. Those features include tab support, session tiling and much more.

Starting from RHEL 8, screen has been replaced with tmux. That basically means the “default multiplexer” recommended by Red Hat is now tmux instead of screen. You know Red Hat is the leading name in Linux world, when they changes something in their flagship products, it must bring huge benefits.

tmux has a lot of integration with VImzsh and many other programs, plus several useful plugins. In contrast, screen is straightforward and, feels more light.

If you’re a fan of Powerline, you’ll be glad to know that tmux can be configured to look and feel like powerline, too

tmux and screen Comparison

Actiontmuxscreen
start a new sessiontmux OR
tmux new OR
tmux new-session
screen
re-attach a detached sessiontmux attach OR
tmux attach-session
screen-r
re-attach an attached session (detaching it from elsewhere)tmux attach -d OR
tmux attach-session -d
screen -dr
re-attach an attached session (keeping it attached elsewhere)tmux attach OR
tmux attach-session
screen -x
detach from currently attached session^b d OR
^b :detach
^a ^d OR
^a :detach
rename the current window^b , <newname> OR
^b :rename-window <newn>
^a A <newname>
list windows^b w^a w
go to window number/name example^b example^a example
go to next window^b n^a n
go to previous window^b p^a p
list sessions^b s OR
tmux ls OR
tmux list-sessions
screen -ls
create another window^b c^a c
exit current shell/window^d^d
split window/pane horizontally^b “^a S
split window/pane vertically^b %^a |
kill the current pane^b x OR (logout/^D)
collapse the current pane/split (but leave processes running)^a X

Click to rate this post!
[Total: 0 Average: 0]

Leave a Comment