[英]In Terminal, what's the difference between “cd /” and “cd ~”?
I don't understand the difference between these two. 我不明白这两者之间的区别。 They both seem to take me to the root directory.
他们似乎都把我带到了根目录。 Are there differences?
有区别吗?
cd ~ takes you to the home directory cd〜将您带到主目录
cd / takes you to the root directory cd /将您带到根目录
these will be the same if you are running it as root 如果您以root身份运行,这些将是相同的
“ cd〜”通常将您带到登录用户的主目录。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.