개발 환경
Find all path for my python
rooter
2023. 2. 10. 21:40
Default python executable
most of you know this.
which python
This command returns the path to the default Python executable in your system's PATH environment variable.
All the pythons installed
ls -la $(which -a python)
This command returns a list of all the Python executables in your system, with additional information about each file, such as its permissions and the time of its last modification. The which -a part of the command returns all the paths to executables named python, and ls -la lists the details of each file.
Another way to find python
find /usr -name "python*" -type f -executable
This command searches the /usr directory and its subdirectories for files that match the specified criteria:
- -name "python*": the file name starts with "python"
- -type f: the file is a regular file
- -executable: the file is executable The find command returns the paths of all files that match these criteria.
반응형