Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to get help for Linux commands

Shulou Source: shulou.com Published: 2022-06-01 13:12:45 10月01日 Update

Editor to share with you how to get Linux command help, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

1. Help Command

For internal commands

For example:

# type cd

Cd is a shell builtin

# help cd

# type ls

Ls is aliased to `ls-- color=auto'

# help ls

-bash: help: no help topics match `ls'. Try `help help' or `man-k ls' or `info ls'.

2. Command-help/-h

For external commands

For example:

# ls-help

III. Man Command

For example:

# man cd

Note the manual manual is divided into chapters; man # Command (# for chapter number)

1. Commands available to all users

2. System kernel calls, not every command has a system call (for example: man 2 read)

3. Library call

4. Special files, such as / dev/tty1

5. File format (syntax of command configuration file, such as: man 5 passwd)

6. Game-related

7. Miscellaneous

8. Administrator commands, such as: fdisk

Man command query operation refer to the command mode in vi,vim usage

Understand man command syntax

[]: optional content

The content must be given

A | b | c: choose one more

... There can be multiple

IV. Info Command

There is a hyperlink to stabilize the document. Info is an information page that provides more detailed information such as the author, version, and when to release. The man manual tells you how to use it.

5. README

Most programs have corresponding help documents, which are saved in the / usr/share/doc folder

Such as:

# ls / usr/share/doc/ntp-4.2.4p8/

ChangeLog COPYRIGHT NEWS

The above is all the contents of the article "how to get Linux Command help". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Commands help content files articles information manuals documents chapters systems grammar references special not so author kernel multiple most folders time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker macOS Shulou Information Microsoft NVidia