Save time by creating multiple Tabs with Linux Screen in the same window

It is tedious to browse through your linux screen windows, by typing “Ctrl a” + ” every-time you want to switch to another window. A better approach, that will save your time is to use multiple Tabs in the same window. You will remember the context and can quickly switch among the tabs.

So let us quickly get the tabs.

Screen Tabs Setup

Open a terminal and first install screen if screen is not already installed

nir@ubuntu:~$ sudo apt-get install screen
nir@ubuntu:~$ which screen

Open your .screenrc file and add the following string and you are set.

nir@ubuntu:~$ cat ~/.screenrc 
caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-="

Note it will work for all new screen session you are creating

Test linux screen with multiple tabs

Let us create a new screen session called myShell

nir@ubuntu:~$ screen -S myShell

Once you are in, you can see already at the bottom
a tab is created named “0 bash”

Create couple more by pressing “Ctrl a” + “c”
You can see more tabs getting created.

To go from one tab to next
“Ctrl a” + “n”

To go from one tab to previous
“Ctrl a” + “p”

To rename a tab use
“Ctrl a” + “A”
(note “A” is in CAPS)

Here is a screenshot of what you will get after executing the above commands

linux screen example
linux screen example

To jump to any tabs you can use the number seen along with the tab
“Ctrl a” + n
where n can be 0,1,2 in the above example.

Leave a Reply

Your email address will not be published. Required fields are marked *