Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to find out the description of "binary command" in Linux and the location in the system

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to find out the description of the "binary command" in Linux and the location in the system. It is very detailed and has a certain reference value. Interested friends must read it!

Suppose you output the value of PATH, then go to one of the directories / usr/local/bin, and notice a new command called fswatch (monitoring file changes):

$echo $PATH$ cd / usr/local/bin

Find new commands in Linux

Now let's find out the description and location of the fswatch command in Linux in different ways.

1. Whatis command

Whatis is used to display an one-line description of the command name you entered as an argument (for example, fswatch in the following command).

If the description is too long, some parts are omitted by default, using the-l flag to display the full description.

$whatis fswatch$ whatis-l fswatch

Example of Linux whatis command

2. Apropos command

Apropos searches for the man page name and keyword description (using the command name as the regular expression search).

Use the-l flag to display the full description.

$apropos fswatch $apropos-l fswatch

Example of Linux apropos command

By default, apropos outputs all matching lines as shown in the example. You can use the-e option to match exactly:

$apropos fmt$ apropos-e fmt

The Linux apropos command displays according to keywords

3. Type command

The type command prints the full pathname of a given command. In addition, if you enter a command name that is not a program for files stored independently on disk, type will tell you about the command classification:

Shell built-in command

Shell keyword or reserved word

Alias

$type fswatch

Example of Linux type command

When the command is an alias for another command, type displays the command that was executed when the alias was run. Use the alias command to view all aliases created on your system:

$alias$ type l$ type ll

Show all aliases in Linux

4. Which command

Which can help the command locate the command, which prints out the absolute path to the command:

$which fswatch

Find the location of the Linux command

Some binaries exist in multiple directories in the PATH environment variable, using the-a flag to find all matching pathnames.

5. Whereis command

Whereis locates the binary, source, and help page files for the specified command name, as follows:

$whereis fswatch$ whereis mkdir $whereis rm

Example of Linux whereis command

Although the above command is important for finding some quick information about the command / program, the manual for the command always provides complete documentation and includes a list of other related programs:

The above $man fswatch is all the contents of the article "how to find out the description and location of binary commands in Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report