I am using Ubuntu 10.04. After I installed screen
:
sudo apt-get install screen
I made two ssh connections to two remote servers by doing the following things step by step (I do the following steps according to the document here):
1. open a termnal window, run command screen
2. press Ctrl+A+c to create a new virtual console
3. ssh usr@IP1
At this point, I have one virtual console which shows I have connected to the remote server(IP1).
4. press Ctrl+A+c to create a new virtual console
5. ssh usr@IP2
So, now I have connected to two remote servers(IP1 & IP2). But, I do not have two tabs on one terminal window, instead, I have to use Ctrl+A+p and Ctrl+A+n to switch between the two virtual console in one terminal window.
Isn't it so that by using screen
, I could have two tabs in one terminal window, with each tab display one connection to one remote server. Why I do not have the tabs in my terminal window?
Best Answer
Here's my
.screenrc
that i use everywhere to see myscreen
numbers as tabs at the bottom of the window and an informational line above the tabs. The part you really need is under "look and feel".You could additionally add the following to automatically add two tabs when the
screen
is initially created:Also, the status content can be updated using escape codes issued from shell commands and prompts. For example, i update the status with the current directory using by using this in my
.bashrc
: