|
Linux Topic Search
|
|
If You Need Help, Ask the man
Assuming you can remember the right command for a particular job, it's tougher still to remember all the switches associated with that command. The man command (short for manual) will help you on both counts by displaying pages from online manuals and telling you which commands may be relevant to the task at hand.
Say you want to change your password, but you don't know the command to do it. You can use the man command plus the keyword flag, -k, to search by keyword password for relevant commands:
man -k password
passwd passwd (1) - change login password
pwck pwck (1m) - password/group file checkers
vipw vipw (1b) - edit the password file
You can probably deduce that passwd is the correct command. But before blindly issuing any Linux command, you should know the proper syntax and understand what the command might do to you first. Using man with a command name will display all you need to know (probably more) about a command. For example, entering
man passwd
will display
passwd(1) User Commands passwd(1)
NAME
passwd - change login password and attributes
SYNOPSIS
passwd [ name ]
passwd [ -d | -l ] [ -f ] [ -n min ] [ -w warn ]
[ -x max ] name
passwd -s [ -a ]
passwd -s [ name ]
DESCRIPTION
The passwd command changes the password or lists
attributes associated with the user's login name.
--More--(5%)
(The man command pauses after each screenful and waits for you to press the spacebar before continuing.) The word More at the bottom of each page indicates how much of the help has so far been displayed. The terms in square brackets are optional parameters (-d, -l, -f, for example); vertical bars indicate that the terms on either side are mutually exclusive--you can use only one at a time.
For more information on the man command, see the man manual.
Previous Lesson: Changing File Permissions
Next Lesson: Changing Your Password
|
![]() |
|
| <Send This Link to a Friend> <Bookmark This Page> | ||