Linux Command help (study note 5) and linux Study Notes

Source: Internet
Author: User
Tags builtin

Linux Command help (study note 5) and linux Study Notes
1. Get Command help1.1 internal and external commands

In short, commands with storage locations in linux are external commands;

An internal command is stored in a linux shell.

Type to determine whether it is an internal command or an internal command

[Root @ localhost ~] # Type help // view the internal and external types of the help Command help is a shell builtin // you can see that help is an internal command [root @ localhost ~] # Type passwd // check whether passwd is/usr/bin/passwd in linux. // The storage location of passwd exists, for external commands [root @ localhost ~] # Type cd is a shell builtin // then passwd is an external command, then cd is an internal command
2. Ways to get help 2.1 help command

Internal Command help documentation. The help format isThe help command can be used.

[root@model Documents]# help cd
2.2. "-- help" option

Most external commands can use -- help for help. If this command does not have the -- help option, a simple command format command word -- help is displayed.

Date -- help // date help
2.3 man command

Online Help is displayed in full screen. Press q to exit. The upper and lower keys are moved. The format is man.

[root@model Documents]# manpath manpage/usr/local/share/man:/usr/share/man/overrides:/usr/share/man/en:/usr/share/man

5. man manual page entry

1 USER command 2 system 3 library 4 Device 5 file system 6 Game 7 Miscellaneous 8 system command 9 kernel command general use items:, 8

6. generally, when you use man to view the help document of a command, you can use whatis to view the entry of this command in the man help document. A command may have multiple man manual page entries (note: when using whatis, if the linux computer is started for 70 minutes, you can use it on your own. If the linux computer is just started, run the makewhatis command to compile it, otherwise, you cannot use the whatis command)

[root@model Documents]# whatis rmrm                   (1p)  - remove directory entriesrm                   (1)  - remove files or directories[root@model Documents]# whatis passwdpasswd               (1)  - update user's authentication tokenspasswd               (5)  - password filepasswd [sslpasswd]   (1ssl)  - compute password hashes[root@model Documents]# 

When you use man to query rm or passwd commands, you can enter:

Man 5 passwd // query the passwd help document man 1 passwd for the file system at the entry // query the passwd help document man 1/1 p rm for the USER command at the entry

You can also directly write

Man rm // common syntax man passwd
2.4 info command

The other online help is similar to the man function, which is detailed and has the intermediate function between different themes.

Format: Press q to exit the info command.

[Root @ model Documents] # info rm // rm details [root @ model Documents] # info passwd // view command details

Usually use help, -- help, enough man to add, info is rarely used

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.