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 להמשיך לרוץ מושב SSH שלך כשאתה מנתק

Screen is like a window manager for your console. המסך הוא כמו חלון של מנהל המסוף שלך. It will allow you to keep multiple terminal sessions running and easily switch between them. היא תאפשר לך לשמור על פגישות מרובות המסוף בריצה לעבור בקלות בין אותם. It also protects you from disconnection, because the screen session doesn't end when you get disconnected. זה גם מגן עליך מפני הניתוק, כי הפעלת המסך אינו סוף כשאתה מנותק.

You'll need to make sure that screen is installed on the server you are connecting to. עליך לוודא כי המסך מותקן על השרת אתה מתחבר. If that server is Ubuntu or Debian, just use this command: אם כי השרת הוא אובונטו או דביאן, פשוט להשתמש בפקודה זו:

sudo apt-get install screen sudo apt-get install המסך

Now you can start a new screen session by just typing screen at the command line. עכשיו אתה יכול להפעיל הפעלה מסך חדש רק על ידי הקלדת המסך בשורת הפקודה. You'll be shown some information about screen. Hit enter, and you'll be at a normal prompt. יוצג בפניך מידע מסוים על המסך. והקש Enter, ואת תהיי ליד הפקודה רגיל.

To disconnect (but leave the session running) כדי להתנתק (אבל לעזוב את הישיבה פועלת)

Hit Ctrl + A and then Ctrl + D in immediate succession. Hit Ctrl + A ולאחר מכן Ctrl + D ברצף מיידית. You will see the message [detached] אתה תראה את ההודעה [מנותק]

To reconnect to an already running session להתחבר שוב למפגש כבר פועל

screen -r מסך-R

To reconnect to an existing session, or create a new one if none exists כדי להתחבר מחדש אל הפגישה קיים, או ליצור אחד חדש אם לא קיים

screen -D -r מסך-D-R

To create a new window inside of a running screen session כדי ליצור חלון חדש של ישיבה בתוך המסך פועל

Hit Ctrl + A and then C in immediate succession. Hit Ctrl + A ואז C, ברצף מיידי. You will see a new prompt. אתה תראה את הפקודה החדשה.

To switch from one screen window to another כדי לעבור מחלון אחד אל מסך אחר

Hit Ctrl + A and then Ctrl + A in immediate succession. Hit Ctrl + A ולאחר מכן Ctrl + A ברצף מיידית.

To list open screen windows רשימת חלונות פתוחים המסך

Hit Ctrl + A and then W in immediate succession Hit Ctrl + A ולאחר מכן W ברצף מיידית

There's lots of other commands, but those are the ones I use the most. יש המון פקודות אחרות, אבל אלה הם אלה אני משתמש ביותר.

This article was originally written on 12/14/06 Tagged with: מאמר זה נכתב במקור ב 12/14/06 עם שתייגת: Adding Software הוספת תוכנה , , SysAdmin SysAdmin , , Ubuntu Ubuntu

Daily Email Updates שערי עדכונים בדוא"ל

You can get our how-to articles in your inbox each day for free. אתה יכול לקבל כמה שלנו למאמרים לתיבת הדואר שלך בכל יום בחינם. Just enter your name and email below: פשוט להזין את שם ואת הדוא"ל שלך להלן:


Name: שם:
Email: דואר אלקטרוני:

Comments (3) תגובות (3)

  1. ukay ukay

    What about keep sessions with server X redirected? מה עם לשמור על פגישות עם שרת X מחדש? (ssh -X) (SSH-X)
    It would be nice. זה יהיה נחמד.

    Thank you in advance תודה מראש

  2. Peter פיטר

    The nohup command can help you there. הפקודה nohup יכול לעזור לך שם. Have a quick google and you will find out all about it. יש Google מהירה תגלה את כל זה.

  3. 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. למדתי להשתמש בפקודה זו לפני זמן רב בדרך הקשה כשהייתי מעדכן Redhat עם יותר מ -100 קבצים כולל עדכוני קרנל מעל SSH ואת הכוח שלנו במשרד מת. Recovering from a half updated OS is not fun so I suggest you use “screen” when using “yum” or “apt-get”. מחלימה חצי עודכן OS הוא לא כיף ולכן אני מציע לך להשתמש "המסך" כאשר משתמשים "טעים" או "apt-get".


Our Friends חברים שלנו
Getting Started התחלת העבודה


About How-To Geek אודות How-To Geek
What Is That Process? מה זה תהליך?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe dwm.exe
ctfmon.exe Ctfmon.exe
wmpnetwk.exe wmpnetwk.exe
mDNSResponder.exe mDNSResponder.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. זכויות יוצרים © 2006-2009 HowToGeek.com. All Rights Reserved. כל הזכויות שמורות.