YouTip LogoYouTip

Linux Comm Screen

# Linux screen Command [![Image 3: Linux Command Manual](#) Linux Command Manual](#) The Linux screen command is used for multiple window management. screen is a multiple window management program. The so-called "window" here refers to a full-screen text-mode display. Typically, you would only use the screen program when logging into a host via telnet or using an old-style terminal. ### Syntax screen **Parameter Description**: * -A Adjusts all windows to the size of the current terminal. * -d Detaches the specified screen session. * -h Specifies the number of buffer lines for the window. * -m Forces the creation of a new screen session, even if one is already attached. * -r Reattaches a detached screen session. * -R Attempts to reattach a detached session. If no detached session is found, creates a new screen session. * -s Specifies the shell to execute when creating a new window. * -S Specifies the name of the screen session. * -v Displays version information. * -x Reattaches a previously detached screen session. * -ls or --list Displays all current screen sessions. * -wipe Checks all current screen sessions and removes any that are no longer usable. ### Examples Create a screen terminal # screen //Create a screen terminal Create a screen terminal and execute a task # screen vi ~/main.c //Create a screen terminal and execute the vi command Leave a screen terminal # screen vi ~/main.c //Create a screen terminal and execute the vi command#include main (){}"~/mail.c" 0,0-1 Press Ctrl+a d in the screen terminal Reconnect to a left screen terminal # screen -ls //Display created screen terminals There are screens on:2433.pts-3.linux(2013-10-20 16:48:59)(Detached)2428.pts-3.linux(2013-10-20 16:48:05)(Detached)2284.pts-3.linux(2013-10-20 16:14:55)(Detached)2276.pts-3.linux(2013-10-20 16:13:18)(Detached)4 Sockets in /var/run/screen/S-root.# screen -r 2276 //Connect to the screen terminal with screen_id 2276 [![Image 4: Linux Command Manual](#) Linux Command Manual](#)
← Linux Comm ShutdownLinux Comm Sliplogin β†’