Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

Here's my .screenrc that i use everywhere to see my screen 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".

# skip the startup message
startup_message off

# go to home dir

# Automatically detach on hangup. 
autodetach on

# Change default scrollback value for new windows
defscrollback 10000

# start with visual bell as default
vbell on
vbell_msg "bell on %t (%n)"

# look and feel
caption always "%{= bb}%{+b w}%n %t %h %=%l %H %c"
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"

activity "Activity in %t(%n)"

shelltitle "shell"
shell -$SHELL

You could additionally add the following to automatically add two tabs when the screen is initially created:

screen ssh usr@IP1
screen ssh usr@IP2

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:

if [ 'screen' == "${TERM}" ]; then
  export PROMPT_COMMAND='printf "\e]2;%s %s\a" "${USER}" "${PWD}" '
share|improve this answer
I've always wondered why it invariably takes some hardcore configuring in order to make screen not suck to work with. P.S. Try shelltitle "$ |shell:" for appending the command name to the title. – amphetamachine Dec 8 '11 at 1:56

I guess you are confusing the tabs on graphic terminals like konsole with those in screen. In screen you switch only the content of a window with the mentioned ^A-Kombinations. This works also on a non graphic environment.

share|improve this answer

When you press Ctrl+a and " you can see the screen "tabs", they aren't supposed to be tabs on your terminal GUI, you can do that manually by creating a new tab at the terminal GUI you are using and then run at the new tab screen -r to return to your screen session and then navigate to your desired session with Ctrl+a and a number or " to see a menu with all your tabs.

You can give a name to each one of you screen "tabs" by pressing Ctrl + a then A .

share|improve this answer
Should need to run screen -r -x if that screen is already attached in the first tab. – Arcege Dec 7 '11 at 12:23

You could configure screen to show a status line that can inform you of many things, I suppose also on which screen window you are, but I don't use a status line, so cannot say for sure.

For what I know, screen do not create tabs, but you have to switch between screens with the command you indicated, or as I prefer Ctrl-A 1, Ctrl-A 2, etc.

To have more that one tab you can use gnome-terminal features, also without screen: Ctrl-Shift-T will create a new tab, and Alt-1, Alt-2, etc. will switch between tabs.

Also I ask why don't you run screen on the server, so using only one ssh connection (but in this case without any tab).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.