I once used a server where using the screen command gave me a colorful header which told me the name of the screen, the total number of screens, the runtime, cpu utilization and maybe some hotkeys to cycle between the instances.

How can I achieve this header on my Ubuntu Precise Pangolin server instance (I have admin rights)? As it is, I don't even see if I'm inside a screen or not.


1 Answer 1


You need to modify your ~/.screenrc if you don't have one you can copy it with:

cp /etc/screenrc ~/.screenrc

and then add the following line.

caption always "%{rw} * | %H * $LOGNAME | %{bw}%c %D | %{-}%-Lw%{rw}%50>%{rW}%n%f* %t %{-}%+Lw%<"

You can change the caption to your personal needs. Therefor you should read the GNU Screen manual especially the string escape chapter.

An alternative to GNU Screen is Byobu, it is an already configured Screen, may be you should take a look at it, if you want GNU Screen. You can install it with

sudo apt-get install byobu 

And of cause there is tmux which is like GNU Screen with less glitches and it always shows a caption. But tmux has different key bindings and if you are used to screen you will need some time to adapt. You can install it with

sudo apt-get install tmux 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .