Working with the Linux Command Prompt

Linux commands share a simple, common structure. This section describes their common structure and explains how you can obtain helpful information about the commands available to you.

Commands and Arguments

The general form of a shell command line is this:

               command [options] [arguments]

The command determines what operation the shell will perform and the options and arguments—which, as indicated by the enclosing brackets, may or may not appear—customize, or fine-tune, the operation. Sometimes the command specifies a program file that will be launched and run; such a command is called an external command. Linux generally stores these files in /bin, /usr/bin, or /usr/local/bin. System administration commands are generally stored in /sbin or /usr/sbin, which are included by default in the path of the root user. When a command specifies a program file, the shell passes any specified arguments to the program, which scans and interprets them, adjusting its operation accordingly.

However, some commands are not program files; instead they are built-in commands interpreted by the shell itself. One important way in which shells differ is in the built-in commands that they support. Later in this section, you’ll learn about some of bash’s built-in commands.

The name of a Linux command almost always consists of lowercase letters and digits. Most commands let you specify options or arguments. However, in any given case, you may not need to do so. ...

Get Learning Red Hat Linux, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.