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 sesiju Running Atvienojot

Screen is like a window manager for your console. Ekrāns ir kā logu menedžeri jūsu konsoli. It will allow you to keep multiple terminal sessions running and easily switch between them. Tas ļaus Jums saglabāt vairākus gala sesijas norisē un viegli pārslēgties starp tiem. It also protects you from disconnection, because the screen session doesn't end when you get disconnected. Tas arī aizsargā jūs no atslēgšanu, jo ekrāns sesija nebeidzas, kad saņemsiet atvienots.

You'll need to make sure that screen is installed on the server you are connecting to. Jums ir jāpārliecinās, ka ekrāns ir instalēta servera esat savienojumu. If that server is Ubuntu or Debian, just use this command: Ja šim serverim ir Ubuntu vai Debian, vienkārši izmanto šo komandu:

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. Tagad jūs varat sākt jaunu ekrāna sēdē tikai ierakstot ekrāna komandrindu. You'll be shown some information about screen. Hit enter, and you'll be at a normal prompt. Jums ir jāparāda arī informāciju par to screen. Rezultāts iebraukt, un jums jābūt normālā ātri.

To disconnect (but leave the session running) Lai atvienotu (bet atstāt sesija darbojas)

Hit Ctrl + A and then Ctrl + D in immediate succession. Hit Ctrl + un tad Ctrl + D tiešā kārtas. You will see the message [detached] Jūs redzēsiet ziņojumu [atdalīts]

To reconnect to an already running session Atjaunot to, kas jau darbojas sesija

screen -r screen-r

To reconnect to an existing session, or create a new one if none exists Atjaunot savienojumu ar pašreizējo sesiju, vai izveidot jaunu, ja tāda nav

screen -D -r screen-A-r

To create a new window inside of a running screen session Lai izveidotu jaunu logu iekšpusē darbojas ekrāna sesija

Hit Ctrl + A and then C in immediate succession. Hit Ctrl + un tad C tiešā kārtas. You will see a new prompt. Tu redzēsi jaunu nekavējoties.

To switch from one screen window to another Lai pārslēgtos no viena ekrāna loga uz citu

Hit Ctrl + A and then Ctrl + A in immediate succession. Hit Ctrl + un tad Ctrl + tiešā kārtas.

To list open screen windows Lai sarakstu atvērtu ekrāna logi

Hit Ctrl + A and then W in immediate succession Hit Ctrl + un tad W tiešā kārtas

There's lots of other commands, but those are the ones I use the most. Pastāv daudz citu komandu, bet tie ir tie, es izmantoju visvairāk.

This article was originally written on 12/14/06 Tagged with: Šis pants tika sākotnēji rakstīts uz 12/14/06 tagged with: Adding Software Ievietošanas Software , , SysAdmin SysAdmin , , Ubuntu Ubuntu

Daily Email Updates Daily Email Updates

You can get our how-to articles in your inbox each day for free. Jūs varat saņemt mūsu how-to rakstus savā pastkastītē katru dienu par brīvu. Just enter your name and email below: Vienkārši ievadiet jūsu vārdu un e-pasta zemāk:


Name: Vārds:
Email: E-pasts:

Comments (3) Komentāri (3)

  1. ukay ukay

    What about keep sessions with server X redirected? Ko par to glabāt sesiju ar serveri X redirected? (ssh -X) (ssh-X)
    It would be nice. Tas būtu jauki.

    Thank you in advance Thank you in advance

  2. Peter Peter

    The nohup command can help you there. Nohup komanda var palīdzēt jums tur. Have a quick google and you will find out all about it. Vai ātrā google un jūs atradīsiet visu par 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. Es iemācījos lietot šo komandu jau sen cietā veidā, ja man bija atjaunināt Redhat ar vairāk nekā 100 faili, ieskaitot kodola atjauninājumus SSH un mūsu varas iestāde gāja miruši. Recovering from a half updated OS is not fun so I suggest you use “screen” when using “yum” or “apt-get”. Atgūstas no puse atjaunošana OS nav jautri, lai es jums iesakām izmantot "screen", izmantojot "Yum" vai "apt-get".


Leave a Comment Leave Comment




Leave your Atstājiet savu friendly draudzīgs comment here. komentārus šeit.

If you have a computer help question, Ja Jums ir dators palīdzēt jautājumu, click here to leave it on the forums click here to atstāt uz forumu instead. vietā.

Note: Your comment may not show up immediately on the site. Piezīme: Jūsu komentārs var neparādīties pat tieši uz vietas.

Our Friends Our Friends
Getting Started Getting Started


About How-To Geek Par How-To Geek
What Is That Process? Kas ir šis process?
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.