简体   繁体   中英

Linux Ubuntu directory root? home?

I know it is very simple thing! but i cannot understand!

what is difference between two directory?

i know when i use cd ~/ , i can go home directory

like this

ubuntu@ip-MY IP :~$

and then i use cd ../

i can go ubuntu@ip-MY IP:/home$

and after one more time

then i located ubuntu@ip- MY IP :/$

what this directory's role

please explain that 3 directory above!

The / is a root directory of the file system - the toppest inod of the tree. /home is typically a directory where the home directories of the users of the system are located. One of those users is the user with name root . But he is a bit special, therefore, he may have his home directory located separately from the other users (ie in security reasons). Then, this directory can be /root , or in the simplest case just / (so, it is the root of the system, and a home directory of the user with the name root at the same time). Hopefully this solves your confusion.

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