$PATH No such file or directory

LinuxMint下使用Terminal输入

$PATH

显示

bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory

一直以为环境变量有什么问题,原来正确查看环境变量的方法是

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

$PATH是一个变量,最上面相当于把它的值输入了。

[email protected] ~ $ /home
bash: /home: Is a directory
[email protected] ~ $ /home:/etc
bash: /home:/etc: No such file or directory
时间: 2024-10-14 08:52:36