Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

Bash: Getting the most out of Terminator
AI4 ^ | 24 May 2011 | Alex Forbes

Posted on 03/12/2019 6:46:57 AM PDT by ShadowAce

Terminator is a must-have tool for Linux administrators. It’s a terminal emulator that supports multiple terminals via tabs, but also by dividing up its window with horizontal and vertical splits.

The user documentation is a bit sparse, in fact what you see in the man page is what you get. In this post I’ll take you through the features that I think make Terminator the best terminal emulator around.

Split panes

This is terminator’s killer feature. Having multiple terminals in one window allows you to have a lot of information on screen and quickly switch between different sessions. E.g. you could be tailing a log in one window while performing actions in another. Or open the man page for a command you’re constructing. Or monitor 10 servers at once. The possibilities are endless.

The simplest way to split the pane is to right-click and select split horizontally or vertically, but it is much more efficient to use the keyboard shortcut keys:

Grouping Terminals

Grouping terminals allows you to perform the same keystrokes on multiple servers at the same time. If terminator has a no.2 feature, this is it. Obviously this can be dangerous and is no substitute for scripting and configuration management, but there are cases where it can be very useful indeed.

The simplest way to group is to click the menu on the top left of a terminal, create a new group and then add other terminals to it like so:

Select new group

Enter a name

Add other terminals to your group

Typing in two terminals at once

Shortcut keys:

Be careful when grouping all as it groups all terminals owned by the process, including other windows that may not be visible (except those belonging to another instance). For this reason, I make a habit of only ever using Super+T or grouping manually, which groups only the current tab. That way I can be sure that I can always see what is happening.

Layouts

Split panes are great but it is a pain having to manually create the desired layout by splitting the terminal window every time you start the program. Fortunately terminator can store layouts.

After setting up your terminals how you want them, right click anywhere, select preferences, then go to the layouts tab. From here click “Add”, and a layout will be created with your current settings:

Creating a layout

You can also enter a command that will be executed when the terminal launches – I use this to open ssh sessions to servers (this is most effective if you have authorized your private key).

Once you’ve saved a layout it’s not immediately obvious how to open it, but basically you have to launch a new instance of terminator with the “-l mylayout” option. It can be useful to create a shortcut which you can then add to a toolbar or launcher:

Creating a launcher

The other options I’ve used are:

Profiles

Profiles are also a very useful feature but I’m sure you can figure this one out yourself. An example of how you might use profiles is creating a profile for live servers and changing the background to red so you know you’re working on a live box. Under the layouts tab assign this profile to the terminal that ssh’s into your server and you’ll never type in the wrong terminal again. As long as you don’t use grouping that is…

I also changed the default profile to not display scrollbars – I prefer to use Shift+PageUp/PageDown so they were basically useless clutter.

That’s it

Once you get used to terminator you’ll wonder how you ever lived without it.


TOPICS: Computers/Internet
KEYWORDS: linux; terminal
I have recently become the OS admin for several Hadoop clusters. Given that I seem to be frequently asked to perform some action on every node in the cluster, I looked into how to log into the entire cluster at once.

Due to some security protocols we use, I could not merely use a parallel tool like pssh. In fact, I (several years ago now) wrote an Expect script to be able to easily log into any server in our environment, which uses two separate passwords to log in to any particular server.

I ran into terminator s a while ago, and love its features--especially grouping. That allow me to connect to multiple server, group them together, and execute commands in parallel without any extra typing. Works great.

With my new Hadoop responsibilities, I log into the same group of servers, perform some task, and then log out. With Layouts, I can merely click an icon on my screen, and a terminator window pops open, divides itself into multiple sessions, each session logs into a server within the cluster, and sets me up for whatever I need to do.

It cuts preparation time for accomplishing routine tasks to zero.

1 posted on 03/12/2019 6:46:57 AM PDT by ShadowAce
[ Post Reply | Private Reply | View Replies]

To: rdb3; Calvinist_Dark_Lord; JosephW; Only1choice____Freedom; Ernest_at_the_Beach; martin_fierro; ...

2 posted on 03/12/2019 6:47:12 AM PDT by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

There is nothing like a really good single purpose tool. Once you learn how to use them they are indispensable.

Not many of your career management wienies get that.


3 posted on 03/12/2019 7:10:27 AM PDT by ImJustAnotherOkie (All I know is what I read in the papers.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce
How many linux admins frequent FR and is this really breaking news? I know I didn't have to click on this thread, but I wondered what kind of mischief those randy linux admins were getting into these days.

Wow. What else do you do in those windows?

4 posted on 03/12/2019 7:22:47 AM PDT by USS Alaska (Nuke all mooselimb terrorists, today.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: USS Alaska
How many linux admins frequent FR and is this really breaking news?

There are over 100 people on my ping ling--and I posted in this is General Chat, not Breaking News.

5 posted on 03/12/2019 7:31:36 AM PDT by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 4 | View Replies]

To: ImJustAnotherOkie
There is nothing like a really good single purpose tool. Once you learn how to use them they are indispensable.

Yup. I've written dozens of single-purpose scripts, but I can string them together, or have one call another, and I get quite powerful tasks do ne with seemingly simple stuff.

6 posted on 03/12/2019 7:32:48 AM PDT by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 3 | View Replies]

To: ShadowAce
Thanks. That is very helpful. I am the admin for only my computers and my friends. Still using Linux Mint Cinnamon 19.1 and it is GREAT!

Good Hunting... from Varmint Al

7 posted on 03/12/2019 8:40:17 AM PDT by Varmint Al
[ Post Reply | Private Reply | To 2 | View Replies]

To: ShadowAce

I used to use gnome-terminal a lot when I had a similar situation where I had to access a lot of servers at once. I had a script that would fire up a terminal that had many tabs, with each tab connecting to a different terminal. Was pretty sweet. I could connect to 20 or more terminals at once in seconds. Since everything was opened predictably, it was easy to find the specific one I needed because it was always in the same place. I separated dev, test, and prod in separate windows so it was somewhat organized that way. Also, you could send a set it up so that when you were typing in one terminal on a window, and it would echo what you were typing in all tabs in that window. It was pretty cool and very efficient. Unfortunately, my setup these days won’t allow that.

Way back in the dark ages when I was working on HP-3000 minicomputers running MPE-V, they had a really interesting networking setup. From one system, I’d be able to issue a command and it would remote me into the other 11 systems I supported, then give me my prompt back. From there you could hop back and forth from any system, and could even daisy-chain if you wanted. At the time, it was the slickest thing I’d ever seen. Once you had all the remotes set up, you could copy data to/from almost as if all the systems were just one big device.


8 posted on 03/12/2019 9:19:07 AM PDT by zeugma (Power without accountability is fertilizer for tyranny.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: zeugma
I used to use gnome-terminal a lot when I had a similar situation where I had to access a lot of servers at once. I had a script that would fire up a terminal that had many tabs, with each tab connecting to a different terminal. Was pretty sweet. I could connect to 20 or more terminals at once in seconds. Since everything was opened predictably, it was easy to find the specific one I needed because it was always in the same place. I separated dev, test, and prod in separate windows so it was somewhat organized that way. Also, you could send a set it up so that when you were typing in one terminal on a window, and it would echo what you were typing in all tabs in that window. It was pretty cool and very efficient. Unfortunately, my setup these days won’t allow that.

Sounds pretty much like the above setup with terminator. I *love* the grouping feature. It allows me to perform the same task at the same time on multiple servers.

9 posted on 03/12/2019 9:21:46 AM PDT by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 8 | View Replies]

To: ShadowAce
Sounds pretty much like the above setup with terminator. I *love* the grouping feature. It allows me to perform the same task at the same time on multiple servers.

Yup. If I ever find myself in a situation were I can make use of it, I'll definitely keep it in mind. I just played with it a little bit and think it would be useful, especially these days with bigger terminals with more screen real estate. I could definitely see the utility of running this in an 8-up screen.

10 posted on 03/12/2019 9:56:50 AM PDT by zeugma (Power without accountability is fertilizer for tyranny.)
[ Post Reply | Private Reply | To 9 | View Replies]

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson