Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

For example, what would it mean to say:

cd ~/mydirectory

share|improve this question

marked as duplicate by Radu Rădeanu, Eric Carvalho, chronitis, Avinash Raj, souravc Feb 7 '14 at 16:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 3 down vote accepted

~ is a shortcut for the home directory, so

cd ~/mydirectory 

Will move to mydirectory if there is such a directory in your home folder, otherwise it will throw a directory does not exist error.


enter image description here

Your home directory is located at /home/<username>.

Trivia: This is why the default bash prompt has a tilde in it like this user@host:~$. The tilde indicates that you are currently in your home directory. If you move somewhere else, for example into /etc it will show user@host:/etc$.

share|improve this answer
I've always used $HOME instead, for clarity and because some programs don't expand a tilde. – minerz029 Feb 6 '14 at 20:59

It's shorthand for your home directory. For example, my desktop directory is at




for short.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.