Originally Published: Tuesday, 8 August 2000 Author: Tom Dominico, Jr.
Published to: learn_articles_firststep/General Page: 1/1 - [Std View]

Shell Skills, Part 3: Essential Commands

In Part 1 of the Shell Skills series, we looked at some of the helpful features of the Bash shell. In Part 2, we learned how to use input, output, and redirection to our advantage. By now, you should have a good idea of how to effectively work with files and directories at the command line. However, that command line won't do you much good unless you know some essential commands that can help to make your life easier.

In Part 1 of the Shell Skills series, we looked at some of the helpful features of the Bash shell. In Part 2 we learned how to use input, output, and redirection to our advantage. By now, you should have a good idea of how to effectively work with files and directories at the command line. However, that command line won't do you much good unless you know some essential commands that can help to make your life easier.

First, let's discuss the required terminology. Commands are used in conjunction with "options" and "arguments". Sometimes the same command can be used in different ways with the use of options. Options tell the command exactly what you need it to do. They generally consist of a hyphen followed by a letter, or two hyphens followed by a word. When using multiple options, you can generally use only one hyphen followed by all the options you wish to use, with no spaces. Arguments, on the other hand, are information that you sometimes need to give, or "pass", to a command. So, for example, "tar -xvf foo.tar" means "use the tar command to untar (x) the filename (f) that I have specified as an argument (foo.tar), and give me the verbose output (v)". Simple, right? To find the available options for a command and available arguments, try "<commandname> --help" or "man <commandname>". Please note that in the examples below, I may not include all possible options for a command, just the most common ones. Sounds like a motivation for doing a little more research on your own, doesn't it?

Working With Files

A Linux system has a plethora of commands available to to assist you in working with files. Since most of the system configuration you'll do involves working with files, these commands can help to make life easier for you.

System AdministrationWorking With Directories Again, this is by no means a definitive list of commands, but it should help to get you started. Remember, man pages and the "--help" option are your friends! You can learn quite a bit just by reading their output, and experimenting (safely, of course... you don't wan to experiment with the "rm" command, for example). Hopefully, the "Shell Skills" series has helped to make you more comfortable with the Linux command line. You'll find that a good grasp of the command line can make you incredibly productive, as you learn to string commands together to perform advanced tasks. Just keep practicing, and soon it will be second nature. Good luck!

Tom Dominico is the FirstStep Project Manager. If you'd like to volunteer for the FirstStep section, check out http://linux.com/volunteer.