Home>Article>Operation and Maintenance> How to check python installation path in linux
How to check the python installation path: 1. Use the whereis command, which is used to find files. The syntax is "whereis python"; 2. Use the which command, which will search in the directory set by the environment variable $PATH. To search for files that meet the conditions, the syntax is "which python".
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
Method 1: whereis python View all python paths
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 <目录>...][文件...]
Method 2: which python Check the currently used python path
Linux which command is used to find files.
which command will search for files that meet the conditions in the directory set by the environment variable $PATH.
Grammar
which [文件...]
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of How to check python installation path in linux. For more information, please follow other related articles on the PHP Chinese website!