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

How to check software installation path in Linux

WBOY
Release: 2022-03-11 10:41:48
Original
13543 people have browsed it

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
Copy after login

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
Copy after login

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 <目录>...][文件...]
Copy after login

Parameters:

  • -b Only search binary files.

  • -B 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.

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

  • -s Only search original code files.

  • -S 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
Copy after login

The result will show:

/usr/bin/MySQL
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template