Difference between ~ and / symbol in Linux environment | how to enter root directory and home directory in short time

what is / and ~ sympol
/ is represent root directory
~ is represent home directory

example type
cd /
then check the present working directory through pwd command
then you see it is root directory


studentwebsite@jkumar-desktop:/$ cd /

studentwebsite@jkumar-desktop:/$ pwd

/


cd ~
then check the present working directory through pwd command
then you see it is home directory of current user
in these case current user studentwebsite

studentwebsite@jkumar-desktop:/$ cd ~

studentwebsite@jkumar-desktop:~$ pwd

/home/studentwebsite
Difference between ~ and / symbol in Linux environment | how to enter root directory and home directory in short time

Post a Comment

0 Comments