Home  >  Article  >  Operation and Maintenance  >  How to check software installation path in Linux

How to check software installation path in Linux

WBOY
WBOYOriginal
2022-03-11 10:41:4813498browse

In Linux, you can use the whereis command to view the software installation path. This command is used to find files. If you use this command to find uninstalled software, the path will not be displayed. The syntax is "whereis specifies the software name".

How to check software installation path in Linux

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

How to check the software installation path in Linux

1. Check the software installation path:

Linux software is installed in more than one place. Let’s check the software first. All paths (addresses) of the installation.

Here is Mysql as an example. For example, I installed Mysql, but I don’t know where the files are installed and in which folders. You can use the following command to view all file paths.

whereis MySQL

Press Enter. If you have installed Mysql, the address of the file installation will be displayed. For example, 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

It can be seen that mysql is installed in in these directories.

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

Linux whereis command is used to find files.

This command will search for files that meet the conditions in a specific directory. These files should be raw code, binary files, or help files.

This command can only be used to find binary files, source code files and man pages. Generally, you need to use the locate command to locate files.

Syntax

whereis [-bfmsu][-B <目录>...][-M <目录>...][-S <目录>...][文件...]

Parameters:

  • -b Only search binary files.

  • -B7b799fe73e35dcfdc019b13f54de80e5 Only searches for binary files in the set directory.

  • #-f Does not display the path name before the file name.

  • -m Only search for documentation.

  • -M7b799fe73e35dcfdc019b13f54de80e5 Only search for description files in the set directory.

  • -s Only search original code files.

  • -S7b799fe73e35dcfdc019b13f54de80e5 Only search the original code files in the set directory.

  • -u Find files that do not contain the specified type.

2. Query the path of the running file:

If you only want to query the address of the running file of the file, just use the following command. (still taking Mysql as an example):

which MySQL

The result will show:

/usr/bin/MySQL

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to check software installation path in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn