CLI Companion

How to Learn the Linux Command Line with CLI Companion

CLI CompanionContrary to an enduring myth, you don’t need to constantly jump to the command line in order to effectively use Linux. There are people who spend all their time ensconced in their favorite window manager who’ve never, and never will, type a string of esoteric commands.

Having said that, there are times when knowledge of the command line can be useful. More than that, it can be beneficial. But what if you’re new to the command line, or just use it infrequently?

There are dozens of good books on the subject, and even more websites and other online resources. Having to grab a book or go to a website to find out, or refresh your memory about, how to do something can really disrupt your workflow. What if you could have a list of the commands that you use available right in your terminal window?

If you’re an Ubuntu user and that’s what you’re looking for, then it’s time to give CLI Companion a look.

CLI Companion?

CLI Companion is a yet another terminal application. But it’s a bit more than that. What sets CLI Companion apart is that you can store commands that you use frequently (or even just every so often). CLI Companion saves those commands in a text file (called a command dictionary) named .clicompanion2 found in your /home directory.

To get CLI Companion, you can download an installer here. After you’ve downloaded it, double-click on the file with the extension .deb to install. You can also install CLI Companion through a Personal Package Archive (PPA). Do that by opening a terminal window and entering the following commands:

[code lang=”shell”]
sudo add-apt-repository ppa:clicompanion-devs/clicompanion-nightlies sudo apt-get update sudo apt-get install clicompanion
[/code]

Now that it’s installed, let’s start working with CLI Companion.

Using CLI Companion

Start CLI Companion by selecting Applications > Accessories > CLI Companion. You can then type the command that you want to run in the main area of the CLI Companion window.

CLI Companion main window

Simple enough, but what about the command dictionary? Click on Command List to open it.

CLI Companion command dictionary

CLI Companion comes pre-loaded with a number of commands, ranging from commands to list the contents of a directory to networking commands. To run a command, click on it in the dictionary and then click Run.

You’ll notice that some of the commands in the dictionary have one or more question marks after them. This means that when you run the command, you’ll need to enter some information — for example, a directory path or the name of one or more files. When you run one of those commands, a dialog box pops up asking for the additional information.

Prompting for options

Just type the required information and then click OK.

Saving your own commands

What gives CLI Companion its power and flexibility is the ability for you to add your own commands to the dictionary. This is especially useful if you want to save commands that you use infrequently, but which are handy.

Click the Add button. A dialog box opens.

Dialog box for adding a command

Type the command that you want to run on the Command field. You might need to consult your favorite command line reference. That’s OK. You’ll only need to do it once for a command.

If you need to input one or more options when the command is executed, remember to add the correct number of question marks. Then, type a hint for each option in the User Input field. Finally, type a short description of the command in the Description field.

A custom command

Click OK to save the command. Simple, no?

CLI Companion is a great way to learn the command line, or to refresh your memory about commands that you haven’t used in some time. While I’m no command line tyro, I find CLI Companion very useful. Especially for those commands that I don’t regularly use.


Posted

in

,

by

Comments

One response to “How to Learn the Linux Command Line with CLI Companion”

  1. Adam Young Avatar
    Adam Young

    Hi Scott,

    Thank you very much for the overview and explanation of CLICompanion!  I am brand-spanking-new to Linux and Ubuntu, and have installed a virtual machine in my Hyper-V environment to run an Ubuntu 64-bit server.  As the server lacks a GUI and is totally CLI-based, I am not sure how to get the CLICompanion terminal to open – would I need to do it from a GUI-based version of Ubuntu?

    Many thanks for the time you put in to illuminate the use of CLICompanion- Adam

Leave a Reply