If prefer using Ubuntu Linux rather than Windows, but you don’t know how to use the command line, you’re missing out on a lot of useful commands. There are many things that are easier and quicker to do on the command line, such as killing a non-responsive program, installing one or more programs, and adding a Personal Package Archive (PPA).
However, the command line in Linux can be daunting, especially when you come from the graphical world of Windows. There is a program, called CLI Companion, that can help make this transition easier for you. It’s purpose is to simplify the process of learning how to use the command line.
Download CLI Companion from
https://launchpad.net/clicompanion
CLI Companion is distributed as a .deb file which can be easily installed in Ubuntu. There are no other versions available, yet, for other Linux distributions.
On the right side of the CLI Companion website, click the link under Downloads.
On the Opening dialog box, select Open with and make sure GDebi Package Installer is selected from the drop-down list. Click OK.
The Package Installer dialog box displays for the clicompanion package. Click Install Package.
The package is installed and a dialog box displays when the installation is finished. Click Close.
To close the Package Installer, select Quit from the File menu.
If you used Firefox to download CLI Companion , the Downloads dialog box may still be open. If so, click the X button in the upper, right corner to close it.
Close your web browser.
To open CLI Companion, select Accessories | clicompanion from the Applications menu.
The CLI Companion main window displays. There is an list of commands at the top of the dialog box that allows you to do some basic things with the command line. Below this list, is a built-in command line ready to accept commands.
You can type the commands on the command line yourself, using the list as a guide, or you can use the CLI Companion graphical user interface (GUI) to launch a command. To use the GUI to run a command from the list of commands, select the command and click the Apply button at the bottom of the window.
NOTE: To run a command in the list, you can also right-click on the command and select Apply from the popup menu.
The selected command is run in the terminal window below the list of commands.
NOTE: If the command requires user input, you will see a dialog box asking for that input. Enter the required input and the command runs.
You can have multiple terminal windows using tabs in CLI Companion. To add a new tab, click the + button below the current tab.
Once you add a tab, you must click on it to activate it.
Once you are ready, you can add your own custom commands to the index of commands in CLI Companion. To do this, click Add on the button bar at the bottom of the window.
On the dialog box that displays, enter the text for the command in the Command edit box. For this example, we are creating a custom command to install software. We entered sudo apt-get install as the Command.
This command requires the name of a program as a parameter, or user input. Therefore, enter what the user must enter in the User Input edit box, such as Name of Program. Enter a description for the command in the Description edit box. Click OK.
The new command is added to the bottom of the list of commands. To use the new command, right-click on the command and select Apply from the popup menu.
If you specified a parameter, or user input, for the command, you are asked for that now. Enter the required input and click OK. For this example, we are installing Wine, which runs Windows programs under Linux (see our post, Run Windows Programs in Ubuntu 10.04, for more information).
The custom command is applied and the installation of Wine starts.
NOTE: We did not continue with the installation, as we just wanted to show how a custom command can be applied. See the post mentioned above for details about installing and using Wine.
You can also change commands in the list. To do this, right-click on the command name and select Edit from the popup menu.
For example, we wanted to add the arguments to the ls command to list all files and directories, including hidden ones, (a) and to use the long listing format (l – lowercase L) because this is how we use the ls command most of the time. To accomplish this, we added -al to the ls command
If your list of commands has gotten rather long, you can search for a desired command, or for words in its description, using the Search edit box. As you enter your search term, the list of commands narrows down to only those commands that match what you have typed.
To get the full list of commands again, simply delete the text from the Search edit box.
You can also use the GUI in CLI Companion to get help about a specific command. To do this, select the command in the list and click the Help button at the bottom of the window.
NOTE: You can also right-click on the command and select Help from the popup menu.
The man page for the selected command displays in the built-in terminal window. Navigation instructions display at the bottom of the terminal window.
Once you learn the commands in the default database in CLI Companion, and you are more comfortable using the command line, you can add your own custom commands as you learn them. CLI Companion can be handy for quickly applying complicated commands.
Here are some websites to help you master the command line in Linux:
- http://www.linuxcommand.org/ – This site offers a free, downloadable book called “The Linux Command Line,” which contains the content from the site in much greater detail.
- http://oreilly.com/linux/command-directory/ – This site contains a Linux Command Directory in a quick-reference-chart style.
- http://www.dsl.org/cookbook/cookbook_toc.html – This site is the online version of the old version of the hard copy book, “The Linux Cookbook,” sold in many stores and on Amazon. You can learn about techniques such as changing your password, listing directories in color, and configuring the X Windows System. This site covers more than just the command line. It gives you a full overview of Linux.
No comments:
Post a Comment