How to Install screen command on CentOS 8 / RHEL 8

screen command not found. How to Install screen command on CentOS 8/ RHEL 8 server

Follow the below steps to Install screen command on CentOS 8 / RHEL 8 server.
 

[root@server /]# screen -S sync
bash: screen: command not found

[root@server /]# screen -S sync
bash: /usr/bin/screen: No such file or directory

 

Screen command is used to start multiple shell sessions on one terminal. On CentOS and Redhat servers, screen command is provided by screen package.

1. To install screen, you must log into your Linux server as ‘root’ or as user with sudo privileges

2. Install EPEL (Extra Packages for Enterprise Linux) repository on your CentOS server

Command to install epel-release :

# yum install epel-release

OR

# dnf install epel-release
 

 
3. Install screen package using yum or dnf install command

Command to install screen :
 

# yum install screen

OR

# dnf install screen

 

 
4. Enter ‘y’ and press enter, if yum ask for confirmation while installing

5. Run the below command to make sure it is installed correctly
 

[root@server /]# screen -v
Screen version 4.06.02 (GNU) 23-Oct-17

 
 

How to download and install screen rpm on CentOS 8 / RHEL 8 server

1. Log into Linux server as ‘root’ or sudo user

2. Download screen rpm from fedoraproject.org website using wget command
 

# wget https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/s/screen-4.6.2-10.el8.x86_64.rpm

 
3. You can install screen rpm using either yum command or rpm command

(a) Install on CentOS / RHEL 8 x86_64 server using yum command :
 

# yum install screen-4.6.2-10.el8.x86_64.rpm

 
Yum command will install screen package and the required dependencies

(b) Install on CentOS / RHEL 8 x86_64 server using rpm command :
 

# rpm -ivh screen-4.6.2-10.el8.x86_64.rpm

 
You must install the below required dependencies if you are installing using rpm command.
 

libc.so.6()(64bit)
libc.so.6(GLIBC_2.11)(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.15)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libcrypt.so.1()(64bit)
libcrypt.so.1(XCRYPT_2.0)(64bit)
libpam.so.0()(64bit)
libpam.so.0(LIBPAM_1.0)(64bit)
libtinfo.so.6()(64bit)
libutempter.so.0()(64bit)

 
 

Screen command usage

 

Use: screen [-opts] [cmd [args]]
or: screen -r [host.tty]

Options:
-4 Resolve hostnames only to IPv4 addresses.
-6 Resolve hostnames only to IPv6 addresses.
-a Force all capabilities into each window’s termcap.
-A -[r|R] Adapt all windows to the new display width & height.
-c file Read configuration file instead of ‘.screenrc’.
-d (-r) Detach the elsewhere running screen (and reattach here).
-dmS name Start as daemon: Screen session in detached mode.
-D (-r) Detach and logout remote (and reattach here).
-D -RR Do whatever is needed to get a screen session.
-e xy Change command characters.
-f Flow control on, -fn = off, -fa = auto.
-h lines Set the size of the scrollback history buffer.
-i Interrupt output sooner when flow control is on.
-l Login mode on (update /var/run/utmp), -ln = off.
-ls [match] or
-list Do nothing, just list our SockDir [on possible matches].
-L Turn on output logging.
-Logfile file Set logfile name.
-m ignore $STY variable, do create a new screen session.
-O Choose optimal output rather than exact vt100 emulation.
-p window Preselect the named window if it exists.
-q Quiet startup. Exits with non-zero return code if unsuccessful.
-Q Commands will send the response to the stdout of the querying process.
-r [session] Reattach to a detached screen process.
-R Reattach if possible, otherwise start a new session.
-s shell Shell to execute rather than $SHELL.
-S sockname Name this session .sockname instead of ...
-t title Set title. (window’s name).
-T term Use term as $TERM for windows, rather than “screen”.
-U Tell screen to use UTF-8 encoding.
-v Print “Screen version 4.06.02 (GNU) 23-Oct-17”.
-wipe [match] Do nothing, just clean up SockDir [on possible matches].
-x Attach to a not detached screen. (Multi display mode).
-X Execute as a screen command in the specified session.