Trying out GNU Screen

3 min

language: ja bn en es hi pt ru zh-cn zh-tw

Hello, I'm incompetent.
Somehow, at work, I find myself in a strange situation where I'm overseeing two teams, managing tasks for developers separately, and also doing my regular duties.
Thanks to that...
Image
The day before yesterday
Image
Image
I went out drinking for two consecutive days, yesterday and the day before.
And in the smoking area, I talked to three Chinese people and received a cigarette called "Huang Jin Ye" (Golden Leaf).
I was happy when someone probably close to 50 years old told me, "Artist hair!" and "Handsome boy!"

Introduction

Recently, my work is mainly done on the CLI, and on a window manager, it often consumes unnecessary resources and it becomes difficult to organize which console window is which, so I want to start using screen, which launches a virtual terminal.

Let's try it

It seems that you can specify a screen name with the -S option.

alleycat:[haturatu]:~$ screen -S test
[detached from 11740.test]

Then, once inside, I'll echo something as a record.

alleycat:[haturatu]:~$ echo screen1-test
screen1-test

Press Ctrl+a, then d to detach.
Now, let's check the existing virtual terminals.

alleycat:[haturatu]:~$ screen -ls
There is a screen on:
        11740.test      (Detached)
1 Socket ituracreen.

And then, I'll re-attach and enter.

alleycat:[haturatu]:~$ screen -r test

I'm in.

alleycat:[haturatu]:~$ echo screen1-test
screen1-test
alleycat:[haturatu]:~$

If you want to close this virtual terminal, you can end the session with exit and close the virtual terminal.
And that's all...
If there's an existing screen with the same name using screen -S, it seems you can enter by checking the PID with -ls and specifying the PID along with the name.
That's all for now. See you next time.

Related Posts