Linux Training Help - Linux Man Page Components and Why They Don’t Work to Get Help with Linux

May 19, 2008 Linux Certifications | Comments (0) admin @ 7:10 pm

As someone new to Linux and wanting to get Linux training, you may have heard or read about getting help with Linux by using a man page.

If you already know Linux, then you can use man pages as a reference to learn more about a Linux command or concept - and in this case, man pages can be quite useful. However, if you are new to Linux, man pages are extremely frustrating to use - and here’s why, and what you can do about it.

5 Main Headings That Are Shown - and Not Shown - on a Linux Man Page

1. NAME - Shows the command name and a brief cryptic description of what the command does.

For the grep command, the brief description is “print lines matching a pattern”.

What? Is this command used to send stuff to print to a printer. Yes, it can be used for this, but by default, Linux “prints” to “standard output”, which is the screen! Confused yet?

2. SYNOPSIS - Shows the how the command is used.

This is supposed to show you how to use the Linux command. The synopsis is also known as the “format” or “syntax” of the Linux command. If you already know what you’re doing, great. If not, this is so vague it doesn’t tell you anything.

3. DESCRIPTION - Describes what the command is used for.

Here’s part of the description of the grep command, exactly as shown on the man page for grep:

“Grep searches the named input FILEs (or standard input if no files are named, or the file name - is given) for lines containing a match to a given PATTERN. By default, grep prints the matching lines.”

Wonderful! - If you already understand all the Linux lingo being used. That is, if you already understand all the Linux terms shown above, including: named input files, standard output, match a given pattern, and prints the matching lines.

But if you’re new to Linux, forget it!

4. OPTIONS - of a Linux command.

There are over 40 options of the grep command and each one is described in the same Linux “geek-speak” as everything else on the man page.

Another big problem with man pages is that the options are all listed alphabetically. There is no way of knowing which ones are the most useful or commonly used.

Linux Tips: If you already know Linux and need to look up the name of an option that is used to do a certain task, man pages are an excellent and quick Linux resource. But if you’re a Linux newbie, look elsewhere!

5. LINUX COMMAND EXAMPLES - There are almost never Linux examples of commands on a Linux man page.

One of the best ways to learn something is by example - just show me and let me try it myself.

But one of the most difficult things to find is examples of how to use a Linux command. Out of thousands of Linux man pages, there are almost never any examples.

How to Get Linux Training on Linux Commands and Concepts

So, how does someone get Linux training on Linux commands and concepts?

1. Get a good Linux book (or Linux ebook) that shows lots of examples and is written in plain English - not “geek-speak”.

This isn’t easy to do. Lots of Linux books are written in “geek-speak” instead of in plain English - the way you need to have a Linux book.

2. Watch Linux video tutorials to get easy Linux training.

This method is great because you see and hear about important Linux concepts. You also see every step in running a Linux command, including why you run the command and what the output of the command means.

You see all the steps to run a Linux command and lots of examples of how to use Linux commands to do Linux administration tasks. After watching a bit of a Linux video, you can just pause the video and then run the Linux command yourself and experiment!

Written by Clyde Boom.

Linux Command Tutorials - Using the info Command to Get Help with a Linux Command or Linux Concept

May 13, 2008 Linux Certifications | Comments (0) admin @ 7:39 pm

As part of your Linux training, it is vital that you clearly understand Linux concepts, like: how to boot Linux, the Linux file system, and how to create a Linux user.

Another part of your Linux training needs to involve learning how to use Linux commands. This is because Linux commands - and not Linux GUI utilities - are by far and away the best way to do Linux administration tasks. Fortunately, Linux has a command named info that allows you to see “info pages” on a Linux concept or Linux command.

Linux Tips: Some Linux distributions (versions) come with lots of info pages installed (over 500) on all kinds of Linux concepts and commands. However, others only have a few info pages. Experiment with your system to see how much Linux “info” you can find!

This Linux command tutorial shows you examples of how to run the Linux info command.

All of the Linux command examples (hands-on labs) shown below have been designed to work with all Linux distributions (versions).

So, if you run the Linux commands shown below yourself, you’ll have a mini Linux command tutorial - a great way to get Linux training and lean how to use Linux.

Linux Info Command Tutorial

Some info pages have a Menu of items to choose from and others don’t.

For example, the info page for the mkdir (make directory) command is just a single info “page” and doesn’t have a Menu. You just read the information on the screen and scroll down as you’re reading.

However, some info pages, like the info page for the grep command, do have a menu.

Using the Linux Info Command - To Get Info on a Linux Command

Run the following Linux command as an example of running the info command to get info on the mkdir command.

]$ info mkdir

This is a single page of info on the mkdir command. Press Page Down until you get to the bottom of the page and then press “q” (without the quotation marks) to quit.

Now run the following Linux command to get info the grep command.

]$ info grep

After running the above command, some Linux distributions will display the man page for the grep command rather than the info page.

If you see “File: grep.info” at the top left of the screen, then you are looking at the info page and not the man page. The “.info” in “grep.info” indicates that you are looking at an info page, and the info page for grep has a Menu and multiple pages rather than just a single page.

Linux Tips: To get info on a different command, just replace “grep” in the command above with the name of the Linux command you need to learn.

Using the Info Command to Get Linux Command Examples

Linux Tips: You will be able to do the following steps if you are looking at the info page for grep (which has a Menu and multiple pages), rather than the man page, which is just a single page.

To see examples of using the grep command, move your cursor to the left of the Menu item: “Usage: Examples” and press Enter.

Linux Tips: Linux command examples are rare in free Linux documentation. If you need to learn a Linux command, use the info command and see if there are any examples shown for the command.

One of the most useful things about the info command is that it sometimes shows examples of Linux commands. However, it can be a bit tricky to navigate the info pages if there are multiple pages. Also, Linux concepts and commands are often described in a very technical manner (in Linux “geek-speak”).

Beyond This “Linux Commands Tutorials” Article

Here are some other important things to learn about the info command and info pages: how to navigate (move around from page to page) in the info pages that have menus, and how to use the info command to find out more info on a Linux concept.

Another way to get Linux training is to use Linux video tutorials. When you watch a Linux video, you can see everything you need on how to use a Linux command or how to understand a Linux concept. You can also pause a Linux video whenever you need to, and watch it as many times as you like!

Written by Clyde Boom.