简体   繁体   中英

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 / takes you to the root directory

these will be the same if you are running it as root

“ cd〜”通常将您带到登录用户的主目录。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM