12

I just learned about screen and it looks wonderful.

Some questions:

  1. How do they actually work?
  2. Why are downloads / process not interrupted in screens even though something bad happened?
1
  • May be useful: echo $TERM in a screen session prints screen as opposed to xterm in ordinary bash sessions. Commented Dec 30, 2017 at 18:06

1 Answer 1

21

Very briefly (it's possible to write several pages on the topic): screen works by

  • setting up a server process that takes over all input/output directly to your terminal,
  • starting client processes for each window that you create, and
  • connecting the server and clients as they are started using a pseudo-terminal connection (a feature of the operating system).

Once a client (window) is created, it is isolated from the other clients. It communicates via the pseudo-terminal connection to the server process, which updates the terminal. The server keeps track of what should be shown on the terminal in a given window, providing you with the ability to switch between windows. The clients run without knowing if screen is currently displaying their information.

1
  • clear and fast +1 Commented Jan 29, 2019 at 9:35

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.