TMUX Screen Utility for UNIX/Linux

The screen utility in Unix/linux has been replaced by the tmux utility as of Release 9. Thus, to have a persistent connection while executing system process such as installation, you will have to migrate to the new tmux utility. In this article we will show the installation of the tmux utility into a linux environment and the general use of tmux.

Installation

The tmux utility is located in the majority of OS repositories and can be retrieved using the dnf command as the root user:

[oracle@localhost test]$ su 
Password: 
[root@localhost test]# /usr/bin/dnf install tmux

[root@localhost bin]# /usr/bin/dnf install tmux
Last metadata expiration check: 0:29:38 ago on Wed 19 Mar 2025 05:23:15 PM UTC.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                       Architecture                                    Version                                            Repository                                                  Size
===================================================================================================================================================================================================================
Installing:
 tmux                                          x86_64                                          2.7-3.el8                                          ol8_baseos_latest                                          316 k

Transaction Summary
===================================================================================================================================================================================================================
Install  1 Package

Total download size: 316 k
Installed size: 726 k
Is this ok [y/N]: y
Downloading Packages:
tmux-2.7-3.el8.x86_64.rpm                                                                                                                                                          712 kB/s | 316 kB     00:00    
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                              698 kB/s | 316 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                           1/1 
  Installing       : tmux-2.7-3.el8.x86_64                                                                                                                                                                     1/1 
  Running scriptlet: tmux-2.7-3.el8.x86_64                                                                                                                                                                     1/1 
  Verifying        : tmux-2.7-3.el8.x86_64                                                                                                                                                                     1/1 

Installed:
  tmux-2.7-3.el8.x86_64                                                                                                                                                                                            

Complete!
[root@localhost bin]# 

You can view the full usage and instruction by accessing the man page for tmux.

# usage of tmux

man tmux

To create a new tmux session simple use the new clause and -s tag to name your session

# creating tmux socket session test1

tmux new -s test1

To execute your active tmux session without closing, user Ctrl-b d

# exit active tmux socket session from within the current session

Ctrl-b d

Create an additional tmux session and exit the session.

# creating tmux socket session test2

tmux new -s test2
Ctrl-b d

To list all existing tmux sessions use the command: tmux list-sessions

# listing active tmux socket sessions

tmux list-sessions

[root@localhost bin]# tmux list-sessions
test1: 1 windows (created Wed Nov 2 15:39:47 2022) [211x58]
test2: 1 windows (created Wed Nov 2 15:41:45 2022) [211x58]
[root@localhost bin]#

To re-attach to tmux session use the command: tmux a -t test2

# attach to test2 session

tmux a -t test2

To kill a tmux session user the command: tmux kill-ses -t test2

# kill session test2

[root@localhost bin]# tmux kill-ses -t test2
[root@localhost bin]# tmux list-sessions
test1: 1 windows (created Wed Nov 2 15:39:47 2022) [211x58]
[root@localhost bin]#