0

I'm learning bash code, and if I try to

cd /Home

I have this error:

bash: cd: Home: Not a directory

If I run:

ls -lh (in /)

The Home "directory" has these features:

-rwxr-xr-x   1 root root 479K Sep 23 17:09 Home

Is it normal or I did a mistake?

Regards.

linofex
  • 554
  • 1
  • 9
  • 28

1 Answers1

2

To get into your "Home directory" you need to run

cd ~

or

cd $HOME

or

cd /home/$USER

Home directory of the current user is located at /home/<user_name>. The current user name is stored in USER variable. The path to the home directory is stored in HOME variable.

Pilot6
  • 92,041