How to Use the Linux Screen Tool

Поделиться
HTML-код
  • Опубликовано: 3 июн 2024
  • Start learning cybersecurity with CBT Nuggets. courses.cbt.gg/security
    In this video, Shawn Powers covers using the Linux Screen tool. You've got a command that'll take a long time and you want to keep it running in the background, and SSH in later from a different machine: manage your time - and your commands - with the Screen tool.
    If you've ever started a command running that you knew was going to take a long time, you're probably already familiar with how hard it can be to keep background applications interactive - especially if after you set up the long process, you return to the device via SSH. If you close the window when you start the command, there's no way to get back to it - without the Screen tool, that is.
    Watch and see how easy it is to start a Screen session - a sort of virtual backgrounded terminal window - and then how to disconnect and reattach screens that are running in the background. Since the screens stay saved, it's perfect for SSHing in later and seeing the results of long processes.
    📁 Download the Ultimate Sysadmin Cert Guide: blog.cbt.gg/skqa
    ⬇️ 4-Week Study Plan: MD-100 & MD-101: blog.cbt.gg/1tso
    Start learning with CBT Nuggets:
    • Everything Linux | courses.cbt.gg/un3
    • Linux Essentials | courses.cbt.gg/45b
    • Linux Server Administration | courses.cbt.gg/ekv
    • CompTIA Linux+ (XK0-004) | courses.cbt.gg/93y
    • Linux Security | courses.cbt.gg/vu0

Комментарии • 22

  • @PrafulDhabekar
    @PrafulDhabekar 3 года назад +6

    You can also run multiple screen sessions. To list out the sessions you can just do:
    sudo screen -ls
    If you want to reattach a session, just type:
    session -r
    and if you want to close one of your session you can do:
    sudo kill

  • @Mipetz38
    @Mipetz38 6 лет назад +14

    Lets run a command thats going to take a long time
    Like ping google
    I love these videos, straight to the point and entertaining

  • @dibbyo456
    @dibbyo456 4 года назад +2

    Short, sweet and straight to the point. 👌

  • @JulienGordon
    @JulienGordon 4 года назад +2

    Great. Short and sweet. To the point for busy ppl :D

  • @daetheknight.
    @daetheknight. 4 года назад +1

    Dude! This video is awesome! Exactly what I needed. Glad I clicked

  • @mamamike12321
    @mamamike12321 6 лет назад +6

    Thank you, straight to the point

  • @dawnstudios7813
    @dawnstudios7813 3 года назад

    Thanks, I used screen some time back and forgot how it worked. This video brought back to me what I needed at the moment.

  • @ruixue6955
    @ruixue6955 2 года назад +2

    0:57 to screen session
    1:18
    1:19 ctrl + A to screen command mode
    1:50

  • @Noah-vm8id
    @Noah-vm8id 3 года назад

    very helpful and compact... thanks!!

  • @alirezakhorami
    @alirezakhorami 2 года назад

    Thank you, nice and clear

  • @winproduction7585
    @winproduction7585 2 года назад +1

    Thank you

  • @weiyuya
    @weiyuya 4 года назад +2

    Thank you very much for this short and informative video! The "doctor" is a great idea because I used to keep forgetting this combination, so that's a really helpful way to remember it. One thing I still find confusing, though, is why you need to "detach" + reattach"? Why is that safer than simply saying "screen -r"?

  • @anastasiiadaieva3816
    @anastasiiadaieva3816 Год назад

    hey, this video has been helpful, but I've got a problem in the long run: my backend is started in a screen session on a VPS. Whenever VPS gets rebooted, the screen session get erased. Is there a way out to make this session persist or just make another one start right after the reboot?

  • @billbakshi3307
    @billbakshi3307 4 года назад

    Oh yes that's great. U mean to say it will take the control of that terminal outputs

  • @c.riccio8803
    @c.riccio8803 6 лет назад

    I followed all the steps. It works on my Mac laptop but it did not work on the Linux server on which I am ssh-ed. Once I go back to the server, there is no screen to reattach.

  • @Ngserdna
    @Ngserdna 2 года назад

    Great vid

  • @MacintoshFanTechnology
    @MacintoshFanTechnology 3 года назад

    'screen -list' is also a way to list your sessions

  • @PezhvakIMV
    @PezhvakIMV 5 лет назад +1

    Thats not all there is to screen. Ctrl+a then hit ? Key and you will see

  • @dhanraj2900
    @dhanraj2900 3 года назад

    how to take the output to a file ..you missed a very imp point

  • @jasperzanjani
    @jasperzanjani 2 года назад

    CBT Nuggets is so trash