0

I don't understand the difference between these two. They both seem to take me to the root directory. Are there differences?

2 Answers2

1

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

tkdkop
  • 119
  • 1
  • 6
  • So, what's the difference between root and home? I'm assuming sometimes they can be the same. When are they different? Can you provide an example? Thank you! – user1653667 Apr 07 '14 at 01:00
  • Normally, if you are logged in as a regular user, your home directory will be something like /home/user Technically your home directory is whatever is defined in the HOME variable use the command "echo $HOME" to see what your home directory is – tkdkop Apr 08 '14 at 00:53
0

"cd ~" usually takes you to the home directory of the logged user.

yarivt
  • 106
  • 1
  • 4