When you often work with terminals in Linux, you are bound to run into difficulty when you want to multitask. Multiple windows or tabs are fine, but when connected to a remote server or other system, you may not always have access to tabs or multiple terminal windows. This is where loyal members of the Linux system administration world tmux
and screen
But, as with everything in the open source community, the choice here is not clear as to which of these commands is best for your use. Today we are with you tmux
against screen
to decide which is the best terminal multiplexer.
Characteristics of terminal multiplexers
Because both tmux
and screen
are terminal multiplexers, there are a few main features I want to talk about as it makes the differences between them a bit more apparent. You usually press a particular key combination that does not register anywhere else in the system to use different features of your multiplexer.
Detach and reattach
You can log into a terminal multiplexer, do some work, and detach it to get it off your screen. It will also keep that session active if you disconnect, preventing the loss of sensitive data. You can then reattach it once you’re ready and need to start working on it again.
Split screen
You can also divide your terminal session into tiles, creating multiple visible terminal sessions at a time. This is great if you keep track of a few different aspects of system resource usage like power, RAM, CPU, and disk I / O, and want to use different monitors to keep track of these different things. Or, you can keep an eye on a system monitor while you compile or compress a large project, making it easy to track the load if something goes wrong.
Session management
Terminal multiplexers help you track your sessions in several ways. The first is that when you detach multiple sessions, you can see them all at a glance. It’s good if you start multiple sessions you don’t know which one you should return to. Plus, you can also name or label sessions, making it easy to keep track of your workspaces. They are starting to become a bit like virtual desktops on a typical desktop operating system.
Features of tmux
One of the main features that I really like about tmux is that you can control sessions from your normal shell prompt without having to enter the session you created. (You can read more about using tmux here.) A good example is session deletion, which can be done through the tmux kill-session
order. If you know for a fact that you are done with a particular tmux session, you can simply kill it from the shell prompt.







There’s also a nice status bar at the bottom of the screen rather than picking up the terminal prompt at the top of the window. It is a little easier to view a tmux workflow than with a screen. In addition, sessions automatically rename themselves based on the command you run, which is useful if you forget to name them.
Screen Specifications
To get started with screen, check out our tutorial here. There is one main feature of the screen that helps it stand out from tmux: session sharing with other users, which can be great on multi-user systems where multiple administrators are working on different jobs. troubleshooting purposes.






Another plus is that if you’re using a Mac, you don’t have to worry about homebrew to install the screen – it’s built right into the terminal.
screen vs tmux in a nutshell
If I had to suggest one, I would suggest tmux. There are a few things that improve tmux. A good example is how you can change attach
with kill-session
and end a session without having to return, terminate the command, then type exit
. Also, the status bar is easier to read and the controls are a bit more human readable.
For a macOS user, the screen may be more convenient, as there is no need for homebrew to boot.
Be sure to check out some of our other articles on Linux tools, such as 15 ls commands you should know, our beginner’s guide to git, and our guide to bash variables and how to use them.
Related:
Is this article useful?
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version=’2.0′;
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,’script’,
‘https://connect.facebook.net/en_US/fbevents.js’);
fbq(‘init’, ‘400239050508508’);
fbq(‘track’, ‘PageView’);