If we wanted to change to our home directory, we could type:
$ cd
With no arguments, cd will change to your home directory, which is
/root for the superuser and typically /home/username
for a regular user. But what if we want to specify a file in our home
directory? Maybe we want to pass a file argument to the myprog command. If
the file lives in our home directory, we can type:
$ ./myprog /home/drobbins/myfile.txt
However, using an absolute path like that isn't always convenient. Thankfully,
we can use the ~ (tilde) character to do the same thing:
$ ./myprog ~/myfile.txt