PHP中文网2017-04-17 14:19:42
/ represents the root node /
~ represents home
if logged in with root account
~ represents /root/
directory
if logged in with user name
~ represents /home/name/
When you log in with the root account
by default you enter the /root
directory.
When you #cd ..
you enter the /
root directory.
When you #cd ~
in any environment, you will enter the /root
directory
PHP中文网2017-04-17 14:19:42
(Assuming you haven’t learned how to change shell and PS1 yet)
/
and ~
are the current working directory. ~
represents the current user’s home directory
#
means that your current user is root. If it is a normal user, it will display $
.