Linux: Using the Command Line to Get Help - dummies

Linux: Using the Command Line to Get Help

By Emmett Dulaney

The Linux Essentials exam covers the topic of using the Command line to get help. The table shows the subtopics, weight, description, and key knowledge areas for this topic.

Breakout of Topic
Subtopic Weight Description Key Areas
Command Line Basics 2 Basics of using the Linux command line Basic shell; Formatting commands; Working with options;
Variables; Globbing; Quoting
Using the Command Line to Get Help 2 Running help commands and navigation of the various help
man files; info command
Using Directories and Listing Files 2 Navigation of home and system directories and listing files in
various locations
Files, directories; hidden files and directories; home
directory; absolute and relative paths
Creating, Moving, and Deleting Files 2 Create, move, and delete files under the home directory Files and directories; case sensitivity; simple globbing and

To adequately address these topics, focus on these files, terms, and utilities: &&; . and ..; /usr/share/doc; ||; apropos; cd; common options for ls; cp; echo; history; Home and ~; info; locate; man; manpages; mkdir; mv; PATH env variable; recursive listings; rm; rmdir; substitutions; touch; whatis; whereis; and which.

Here are the top ten items to know as you study for this domain:

  1. Regular expressions – often referred to as globbing – can be used with the shells available in Linux to match wildcard characters. Among the possible wildcards, the asterisk (*) will match any number of characters; the question mark (?) will match only one character.

  2. Linux is a case-sensitive operating system.

  3. Files can be “hidden” by preceding their names with a single period (.). In pathnames, however, a single period (.) specifies this directory and two periods (..) signifies the parent directory.

  4. Absolute paths give the full path to a resource, while relative paths give directions from where you are currently working. An example of an absolute path would be /tmp/eadulaney/file whereas a relative link would be ../file.

  5. Files can be copied using cp or moved using mv. Files can be deleted with rm and directories (which are created with mkdir) can be removed with rmdir. Recursive deletion can be done with rm –r.

  6. To change directories, use the cd command. When used without parameters, this will move you to your home directory. To see what directory you are presently working in, us the pwd (present working directory) command.

  7. The ls command has a plethora of options to allow you to list files. The –a option will list all (including hidden) files.

  8. Help is available through the manual pages (accessed with the man command) and info (which shows help files stored beneath /user/info).

  9. The whatis command shows what manual pages are available for an entry while whereis shows the location of the file and all related files (including any manual pages).

  10. Many standard utilities allow you to enter the name of the executable followed by “–help” to obtain help only on the syntax.