Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 constantly opening up a pair of terminal windows which I like to have on separate tabs that I then use to SSH to the same pair of servers. I then set the titles of each tab to be that of the server I am connecting to. This is something I do manually every day and would love to be able to automate it.

So I tried the following:

gnome-terminal --tab
gnome-terminal --tab
gnome-terminal -t hello
gnome-terminal -t=hello
gnome-terminal -t="hello"
gnome-terminal --title="hello"
gnome-terminal --title=hello
gnome-terminal --title='hello'
gnome-terminal --tab --title='hello'

None of these options were able to open a new terminal window in a tab or with the title set to "hello". I haven't even tried to tackle the problem of ssh-ing to the servers yet. What am I doing wrong?

share|improve this question
up vote 3 down vote accepted

Try this:

gnome-terminal --tab -t "watch" -e "watch ps -ef" --tab -t "top" -e "top"

It seems that gnome-terminal ignores --tab if there is only one in the command line. You have to provide at least two --tab to have some effect.

The command to execute is given by -e or --command. I used watch and top in my example because they run indefinitely so the tabs will stay open. Once the command is done executing the tabs will close themselves. Read this answer for how to prevent the tabs from closing once the command is done executing.

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.