Home>Article>Operation and Maintenance> How to check python installation path in linux

How to check python installation path in linux

WBOY
WBOY Original
2022-04-07 18:06:50 13952browse

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".

How to check python installation path in linux

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

How to check the python installation path in Linux

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

How to check python installation path in linux

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 [文件...]

How to check python installation path in linux

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!

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