When I connect with the Linux, I am under /root library.[root@localhost ~]# lsanaconda-ks.cfg   packstack-answers-20170515-095857.txtkeystonerc_admin  tmp-packstack-answers-20170515-095856.txtkeystonerc_demoThere is two questions:Why in /root there is ~ in the [root@localhost ~] but not the root?Because if I in /tmp, this is [root@localhost tmp]#.Why connected with linux, I am under the /root, but not the /, if there is something convenient for us to config, where is the benefits?
Why connected with linux we under the /root directory?
linux
First of all, you log in to your home directory which is defined in your password file (/etc/passwd).The ~ simply indicates that you are presently in your home directory and can also be used as a shortcut.  If you want to go in your something directory which is inside your home, you can cd ~/something.You do not want to log in any public directory for security reasons because of your profile configuration and connection logs for example.It is not inconvenient to change directories (cd).