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 does linux view the software installation path

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces linux how to view the software installation path related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that everyone after reading this linux how to view the software installation path article will have a harvest, let's take a look.

In linux, you can use the whereis command to view the software installation path, which is used to find files. Using this command to find software that is not installed will not display the path, and the syntax is "whereis specifies the software name".

The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

How does linux view the software installation path

First, check the software installation path:

Linux software is installed in more than one place, let's first check all the paths (addresses) where the software is installed.

Take Mysql as an example. For example, I installed Mysql, but I don't know where the files are installed or in which folders. You can check all the file paths with the following command.

Whereis MySQL

Enter, if you have installed Mysql, the installation address of the file will be displayed, such as my display (the installation address may be different)

Mysql: / usr/bin/mysql / usr/lib/mysql / usr/share/mysql / usr/share/man/man1/mysql.1.gz

As you can see, mysql is installed in these directories.

If you do not have mysql installed, the file path will not be displayed.

The Linux whereis command is used to find files.

This directive looks for files that meet the criteria in a specific directory. These files should belong to the original code, binaries, or help files.

This directive can only be used to find binaries, source code files, and man man pages, and the general file location needs to use the locate command.

Grammar

Whereis [- bfmsu] [- B...] [- M...] [- S...] [file.]

Parameters:

-b looks for only binaries.

-B only looks for binaries in the set directory.

-f does not display the path name before the file name.

-m only looks for description files.

-M only looks for description files in the set directory.

-s only looks for the original code file.

-S only looks for the original code file in the set directory.

-u looks for files that do not contain the specified type.

Second, query the path where the running file is located:

If you only need to query the address where the file is running, you can simply use the following command (or take Mysql as an example):

Which MySQL

The results show:

/ usr/bin/MySQL, this is the end of the article on "how to check the software installation path for linux". Thank you for reading! I believe you all have a certain understanding of the knowledge of "how to view the software installation path in linux". If you want to learn more, you are 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