gpt4 book ai didi

linux - 请告诉我 cd bin 和 cd $bin 有什么区别?

转载 作者:太空宇宙 更新时间:2023-11-04 05:27:17 26 4
gpt4 key购买 nike

如果我们使用 cd bin,我们应该能够导航到 bin 文件夹。

那么bin目录前使用$的目的是什么?“cd $bin_dir

请解释一下

最佳答案

$bin_dir 是环境变量(请阅读此处了解更多信息 - EnvironmentVariables ),假设 $bin_dir 声明为 export bin_dir=/usr/local/bin,那么您的命令 cd $bin_dir 等于 cd/usr/local/bin

关于linux - 请告诉我 cd bin 和 cd $bin 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29248480/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com