linux - "~#" 和 "/#"的区别是什么?
高洛峰
高洛峰 2017-04-17 14:17:42
0
2
918

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(2)
洪涛

/ 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

Ty80

(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 $.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!