Linux view mysql installation path

1. View the file installation path

Since the software is installed in more than one place, let's talk about all the paths (addresses) where the files are installed first.

Take mysql as an example here. For example, I installed mysql, but I don't know where and in which folder the files are installed. You can use the following command to view all file paths.
Enter in the terminal:

whereis mysql

Press Enter, if you have installed mysql, it will display the file installation address, such as my display (the installation address may be different)

[root@localhost ~]# whereis mysql
mysql: /usr/bin/mysql /usr/lib/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz

2. Query the path of the running file (folder address)

If you only need to query the address of the running file of the file, you can directly use the following command (still take mysql as an example):

which mysql

The terminal shows:

[root@localhost ~]# which mysql
/usr/bin/mysql

Guess you like

Origin blog.csdn.net/he1234555/article/details/114461557