user3696177 user3696177 - 4 months ago 19
Bash Question

what does cd /./ does in bash

I tried just for fun doing

cd /./
in gnome-terminal and the
~
before
$
disappeared and
/
appeared instead.

for example:

username@machinename:~$


changed into

username@machinename:/$


What did it do?
It doesn't change directory's after that happened.
I am new to GNU/linux.

Answer

Yes, you changed directories, from your home directory (~) to the root directory (/).

/./ is the same as /., which is the same as /.