Linux Foundation 01 learns to use commands to help

Source: Internet
Author: User

Linux Foundation 01 Learn to use Commands Help overview

In the Linux terminal, we need to turn to the help document of the system in the face of the command do not know how to use, or do not remember the spelling and parameters of the command;
The built-in Help documentation for the Linux system is very detailed and usually solves our problems, and we need to know how to use them properly.
We can search by man-k only when we remember some command keywords.
You need to know a brief description of a command, you can use Whatis, and in more detail, the info command is available;
To see where the command is located, we need to use which;
For the specific parameters of the command and the use of the method, we need to use the powerful man;
The following are introduced separately;

command using a brief description of the view command

$whatis command
Briefly describe the role of the command; (Displays the Man category page where the command is located)
Regular match whatis-w "*zip"

$info command
A more detailed description of the document

Using the Mans

$man command
Query the description document for command commands

Eg:man Date
Pages up and down using page up and PAGE Down

In Man's Help manual, the help document is divided into 9 categories, and for some keywords there may be multiple categories,
We need to specify a specific category to view; (typically we query bash commands, categorized in 1 categories);

The category ID that the man page belongs to (commonly used in categories 1 and 3):
(1), the user can manipulate the command or the executable file
(2), system core callable functions and tools, etc.
(3), some common functions and databases
(4), the description of the equipment file
(5), settings file or some file format
(6), games
(7), conventions and agreements, etc. such as Linux standard file system, network protocol, Ascⅱ, code and other description content
(8) Management doctrine available to system administrators
(9), kernel-related files

It says that using Whatis will show the specific document category where the command is located, and we'll learn how to use it;
eg
$whatis printf
printf (1)-format and print data
printf (1p)-Write formatted output
printf (3)-formatted output conversion
printf (3p)-Print formatted output
printf [Builtins] (1)-bash built-in commands, see Bash (1)
We see printf in both Categories 1 and 3, and the pages in Category 1 are the Help for command operations and executables, while 3 is a common function library description, and if we want to see the use of printf in C, you can specify the help to see Category 3:

$man 3 printf

$man-k keyword
Query keywords
Query commands based on some of the keywords in the command, for situations where only some commands are remembered;
eg
Find the Config Configuration Tool command for GNOME:
$man-K GNOME config| grep 1

For a word search, you can use/word directly:/-a;
See ALSO for more exciting things to watch

View Path

$which command
View the path of the binary file for the program

eg
$which make: Find the Make program installation path;
/opt/app/openav/soft/bin/make Install

$whereis command
To view the search path for a program
This command comes in handy when multiple versions of the same software are installed in the system, unsure of which version to use;

Summarize

Whatis info Man which Whereis

Posted by: Big CC | 18may,2014
Blog: blog.me115.com [Subscribe]
Weibo: Sina Weibo

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.