How to Use the Screen Command in Linux – Hongkiat

Read Time:1 Minute, 19 Second


This command is used to create a brand new session inside your present session. It usually is used to run long-running course of. The method will proceed to run even when present session is terminated whether or not because of dangerous connection or an exit. It may be used to log in to a selected session and resume the method the place it’s left off.

Common syntax for display command:

display [OPTIONS] [SESSION NAME]
Create a session with specified identify
display -S [file]

The -S possibility creates a brand new window throughout the display and names it.

Instance: Let’s identify our session “newexample” and begin a brand new window.

create a session
Record all display processes
display -ls

This feature shows all presently open home windows, together with these operating within the background.

Instance: Typing the display -ls command to show the variety of screens out there.

list all screen process
Reattach the Terminal’s session
display -r [filename]

Use this feature to reattach a display session which was indifferent in previous.

Instance: Reattaching the beforehand disconnected display session named instance.

reattach terminal session
Detach a session
display -d [file]

The -d possibility is used to detach the display session, permitting it to be reattached later.

Instance: Itemizing all presently hooked up screens and detaching the session named newfile.

detach session
Share a display’s session
display -X [sharing_session]

This feature permits two folks to log into the identical account from completely different areas.

Instance: The consumer referred to as username is logging into the ubuntu account and connecting to the display session newexample.

share session



Source link

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published.