Run processes in SSH and be able to reconnect to them later via screen

  • General Information


    If you want to run a command, process or whatever via SSH directly and move it to the background attach to it later again, screen is what you need.


    Installation


    apt-get install screen


    Usage


    Start screen with command screen
    Inside that screen, start your process like you allways do. You detach from that screen with CTRL+A then hit D.


    The screen now runs in the background, you can even drop off your SSH connection.


    Once you reconnect via SSH and want to reconnect to your screen, simply type in screen -r If there's more then one intance of screen running, you will get notified that there are multiple instances running and you need to specificy which instance you want to resume. You can also pull up that list by typing in screen -list. You can resume the screen you want by typing screen -r <id_from_list>.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!