Operations 6 min read

Master Linux Screen: Share Sessions, Keep Tasks Running, and Split Screens

This guide explains how to install GNU Screen, create and share sessions across multiple hosts, keep long‑running commands alive after network loss or window closure, and use Screen's split‑screen feature for multitasking in a Linux terminal.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Linux Screen: Share Sessions, Keep Tasks Running, and Split Screens

Screen is a GNU‑developed command‑line terminal multiplexer that lets multiple terminal windows attach to the same shell session, allowing programs to keep running even if the network drops or a window closes.

Install Screen

sudo apt install screen -y

On CentOS you must first install epel-release before installing Screen with yum or dnf.

Session Sharing

Create a named session on host A: screen -S it From host B, list existing sessions: screen -ls Attach to the session: screen -x it Both hosts now share the same session; any command run on one is visible on the other. To leave the session, run exit or press Ctrl+A D to detach.

Keep Tasks Running After Disconnect

Run a long‑running command (e.g., ping 10.10.10.1) inside a Screen session on window A. From window B, you can verify the process with ps aux | grep ping. After closing window A, the ping continues running inside the detached Screen session, which you can later re‑attach with screen -r test.

Split‑Screen Usage

Create a new Screen session: screen -S test Press Ctrl+A then Shift+S to enable split screen.

Switch to the lower region with Ctrl+A Tab, then create a new window in that region with Ctrl+A C. Use Ctrl+A Tab to toggle between regions. Exit each region with exit, then detach or quit the whole session as needed.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linuxsplit-screensession sharingscreen
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.