What does `~/ ` mean?

I'm new to Linux and Ubuntu. People keep using ~/filename in their answers to my questions. What does ~/ mean?


~/ is shorthand for the current user's home folder. So if your user name is "foobar" it expands to /home/foobar/


An important thing is, if you are using the root user, ~/ will be the /root directory, not /home/user_name.

In this case, do:

> cd ~/ ; pwd ;

It will exit:

> /root

In general the tilde ~ represents your home folder. Use it to refer to your home directory at the command line.