Running Gnome Terminal Tabs with custom title and command

tech kamar
1 min readDec 18, 2023

Often we come into situation where we need to run multiple gnome-terminal tabs. Also we might need to give them title to avoid confusion of which is which.

So here is the command to run bash scripts in a new tab with title for gnome-terminal.

First the syntax

gnome-terminal --tab --title "<Your Title>" -- bash -c "<Your custom command>; exec bash -i"

Now lets see with real world example. Let’s say you want to know system proces info using top command and that too in a new tab. So we can do it like this.

Lets save the contents given below to a file called topcommand.sh

gnome-terminal --tab --title "System Process Info" -- bash -c "top; exec bash -i"

now lets open a terminal and run it with the command

sh topcommand.sh

Now let’s see the output

You can see that it started the process in a new tab with title

Give a clap if you liked this small tutorial

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response