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%)
No comments:
Post a Comment