Skip to main content

Linux Screen for session management

Need multiple shell sessions?

You are logged into your remote server via SSH and happily plucking along at your keyboard and then it happens. Suddenly, the characters stop moving and then you get the dreaded “Connection Closed” message. You have just lost your session. You were halfway through some task and now you have to start over. Ugh. Well you can prevent this from happening by using screen.

Lost your shell connection?

The Linux screen tool can not only save you from disconnection disasters, but it also can increase your productivity by using multiple windows within one SSHsession. 

What is Screen for Linux?

As the man page states, “Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells).” This can be a life saver when working on your dedicated server. Screen has a several great features for helping you administer your server more productively and safely.

Installing Screen on Linux

Chances are that you already have screen on your system. On most Red Hat distributions you can find it in /usr/bin/screen. 
[root@arun01-I84076 /]# which screen
/usr/bin/screen

If you do not have screen, then you can install it easily from an RPM or the package file for your system. On Cobalt Raq servers, you can safely use the RedHat RPMS appropriate for your system.
Screen RPMs: rpmfind
Screen Web site: GNU Screen
Using screen Command in Putty
[root@arun01-I84076 /]# man screen
       
1.To enter into screen type screen command in putty window
[root@arun01-I84076 /]# screen


Screen shell
2.To view the screen help press ctrl+A then ?
Enter q to exit from help window
3.To create a new screen press ctrl+A and hit "c" to create new screen.
4.Now you can perform what ever installation you need and press ctrl+A and hit "d" to detach from screen.
5.You can toggle to several windows by ctrl+A
6.To know what are the screens available
sh-3.2# screen -list
There are screens on:
        17457.pts-1.arun01-I84076      (Attached)
        17894.pts-3.arun01-I84076      (Attached)
        4 Sockets in /var/run/screen/S-root.
7.To get back from screen press ctrl+D
8.If you login as new session then you can attach your screen by 
[root@arun01-I84076 ~]# screen -r 18454.pts-7.navve01-I84076




Comments

  1. Thanks for giving the tips. You can also try Go4hosting to experience best hosting services.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to make the email Address Dummy in Oracle Database?

How to make the email Address Dummy in Oracle Database? Query to make the email Address as dummy, update <tablename> set <Columnname> = '@' || <Columnname> where <Columnname>  is not null; Query to Remove the email Address as dummy, update <tablename> set <Columnname>= substr(<Columnname>,2,length(<Columnname>)) where <Columnname> is not null;

How to clear screen in sqlplus

If you want to clear screen in sqlplus window there is small cmd that you need to remember which is below, SQL> select username from dba_users; USERNAME -------------------- BOCMS BOAUDIT  CKI8727 GRU9151 MNA9189 FRE9283  KKO8750  KMU8649 HME9041 ZLP1492 DBE9176  QRA8651  PFI8706 SQL> host cls Once you hit enter the screen will be cleared. SQL> select username from dba_users; USERNAME -------------------- BOCMS BOAUDIT  CKI8727 GRU9151 MNA9189 FRE9283  KKO8750  KMU8649 HME9041 ZLP1492 DBE9176  QRA8651  PFI8706 SQL>clear screen Once you hit enter the screen will be cleared.

Upgrading Windows Server 2008 R2 with a command-line tool using DISM

Windows Server 2008 R2 includes a command-line tool called the Deployment Image Servicing and Management tool, or DISM. It's functionally equivalent to the Windows Anytime Upgrade feature in client versions of Windows. You can run it from an elevated command prompt. To determine the currently installed edition: DISM /online /Get-CurrentEdition To determine the editions you can upgrade to: DISM /online /Get-TargetEditions To actually perform an upgrade: DISM /online /Set-Edition:<edition ID> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX