Users’ personal files are often found in /home (for ordinary users) or /root (for the superuser). Your home
directory is typically
etc. There are several ways to locate or refer to your home
With no arguments, the
cd command returns you (i.e., sets the
shell’s working directory) to your home directory.
The environment variable
HOME (see Shell variables) contains the name of your home
$ echo $HOME The
echocommand prints its arguments /home/smith
When used in place of a directory, a lone tilde is expanded by the shell to the name of your home directory.
$ echo ˜ /home/smith
When followed by a username (as in ~fred), the shell expands this string to be the user’s home directory:
$ cd ˜fred $ pwd The “print working directory” command /home/fred