Important! This is an automatic machine translated page. If you can read english, you should Click Here to read the original English version of the article.

Keep Your SSH Session Running when You Disconnect Keep Your SSH beh pri odpojení

Screen is like a window manager for your console. Obrazovka je ako správca okien pre konzoly. It will allow you to keep multiple terminal sessions running and easily switch between them. To vám umožní udržiavať viac terminálov sedenie beží a jednoducho medzi nimi prepínať. It also protects you from disconnection, because the screen session doesn't end when you get disconnected. Tiež vás ochráni pred odpojením, pretože obrazovka relácie nekončia, keď sa odpojí vás.

You'll need to make sure that screen is installed on the server you are connecting to. Budete sa musieť uistiť, že obrazovka je nainštalovaný na serveri, ku ktorému sa pripájate. If that server is Ubuntu or Debian, just use this command: V prípade, že server je Ubuntu alebo Debian, stačí použiť tento príkaz:

sudo apt-get install screen sudo apt-get install screen

Now you can start a new screen session by just typing screen at the command line. Teraz môžete spustiť novú reláciu obrazovky jednoduchým zadaním obrazovky v príkazovom riadku. You'll be shown some information about screen. Hit enter, and you'll be at a normal prompt. Najprv sa zobrazí nejaké informácie o obrazovke. Stlačte klávesu Enter a budete sa pri bežnej riadku.

To disconnect (but leave the session running) Ak chcete odpojiť (ale opustiť zasadnutie beh)

Hit Ctrl + A and then Ctrl + D in immediate succession. Hit Ctrl + A a potom Ctrl + D bezprostredne po sebe. You will see the message [detached] Zobrazí sa správa [stojace]

To reconnect to an already running session Pripojiť k už bežiaci session

screen -r screen-r

To reconnect to an existing session, or create a new one if none exists Pripojiť k existujúcej relácii, alebo vytvoriť nový, ak neexistuje žiadny

screen -D -r screen-r-D

To create a new window inside of a running screen session Ak chcete vytvoriť nové okno vnútri bežiaci screen session

Hit Ctrl + A and then C in immediate succession. Hit Ctrl + C a potom bezprostredne po sebe. You will see a new prompt. Uvidíte novú výzvu.

To switch from one screen window to another Ak chcete prepnúť z jedného okna do druhého displeja

Hit Ctrl + A and then Ctrl + A in immediate succession. Hit Ctrl + Ctrl + a potom bezprostredne po sebe.

To list open screen windows Ak chcete zoznam otvorených okien obrazovky

Hit Ctrl + A and then W in immediate succession Hit Ctrl + W a potom bezprostredne po sebe

There's lots of other commands, but those are the ones I use the most. Je tu veľa ďalších príkazov, ale to sú tie používam najviac.

This article was originally written on 12/14/06 Tagged with: Tento článok bol pôvodne napísaný na 12/14/06 Tagged s: Adding Software Pridanie Software , , SysAdmin SysAdmin , , Ubuntu Ubuntu

Daily Email Updates Denný Svářeč

You can get our how-to articles in your inbox each day for free. Môžete si naše jak-na články vo vašej schránky každý deň zadarmo. Just enter your name and email below: Stačí zadať svoje meno a e-mail nižšie:


Name: Meno:
Email: E-mail:

Comments (3) Komentáre (3)

  1. ukay ukay

    What about keep sessions with server X redirected? Čo si o udržanie relácie so serverom presmerovaný X? (ssh -X) (ssh-X)
    It would be nice. Bolo by pekné.

    Thank you in advance Thank you in advance

  2. Peter Peter

    The nohup command can help you there. Nohup príkaz vám môže pomôcť tam. Have a quick google and you will find out all about it. Majú rýchly google a nájdete všetko čo sa to.

  3. Eduardo Sanchez Eduardo Sanchez

    I learned to use this command a long time ago the hard way when I was updating Redhat with more than 100 files including kernel updates over SSH and our the power in the office went dead. Naučil som sa používať tento príkaz dávno tvrdo, keď som bol aktualizáciu Redhat s viac ako 100 obrázkov, vrátane aktualizácie jadra cez SSH a naša sila v kancelárii zhasla. Recovering from a half updated OS is not fun so I suggest you use “screen” when using “yum” or “apt-get”. Zotavuje z polovice aktualizovaný operačný systém nie je žiadna zábava, takže odporúčam použiť "obrazovka" pri použití "yum" alebo "apt-get".


Leave a Comment Zanechať komentár




Leave your Zanechajte svoj friendly priateľský comment here. komentár tu.

If you have a computer help question, Ak máte počítač pomôže otázku, click here to leave it on the forums kliknite tu nechať to na fórach instead. miesto.

Note: Your comment may not show up immediately on the site. Poznámka: Váš komentár sa nezobrazia okamžite na mieste.

Our Friends Naši priatelia
Getting Started Začíname


About How-To Geek O tom, ako-To Geek
What Is That Process? Čo je to za proces?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe Dwm.exe
ctfmon.exe ctfmon.exe
wmpnetwk.exe wmpnetwk.exe
wmpnscfg.exe WMPNSCFG.exe
rundll32.exe rundll32.exe
wfcrun32.exe wfcrun32.exe
Ipoint.exe Ipoint.exe
Itype.exe Itype.exe
Wfica32.exe Wfica32.exe
Mobsync.exe Mobsync.exe
conhost.exe conhost.exe
Dpupdchk.exe Dpupdchk.exe Adobe_Updater.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. Copyright © 2006-2009 HowToGeek.com. All Rights Reserved. All Rights Reserved.