查找一个程序所在的路径
以geckodriver为例
命令行查找路径方法一:
which geckodriver
1.命令行查找路径方法二
echo $PATH
/home/username/miniconda3/envs/py3/bin:/home/username/miniconda3/condabin:/home/username/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/local/games
2.逐一列出环境变量下的子目录
ls miniconda3/envs/py3/bin:miniconda3/condabin:.local/bin:usr/local/sbin:usr/local/bin:usr/sbin:usr/bin:local/games:local/games