11

I'm new to Linux and have been seeing this often. Could someone explain the concept here?

~/.somefilename

What does the ~ (tilde) signify?

d-_-b
  • 325
  • 2
  • 4
  • 16
  • 3
    In any case, this is covered in the appropriate *shell reference*, such as the [Bash Reference Manual](http://www.gnu.org/software/bash/manual/bashref.html). – pst Sep 12 '12 at 23:10
  • Looks like google does not support it http://support.google.com/websearch/bin/answer.py?hl=en&answer=2466433 – Adrian Cornish Sep 12 '12 at 23:12
  • 1
    tilde is the users' home directory – ddyer Sep 12 '12 at 23:09

3 Answers3

22

The ~ (tilde) is a quick way of specifying your home directory.

The ~/.somefilename means your home directory, the file .somefilename.

slhck
  • 223,558
  • 70
  • 607
  • 592
Lipongo
  • 497
  • 3
  • 10
  • 3
    I should also mention that the . infront of a file name normally signifies it is a hidden file. It will not show up by default in an ls of a directory unless you specify -a as an option to the ls command. –  Sep 12 '12 at 23:14
5

The tilde ~ character is interpreted by most shells as the "home directory" for you. The "." doesn't mean anything if it's part of a filename, although some programs such as ls will (unless explicitely told otherwise) not show files if their name starts with a "dot". Sort of a "hidden" attribute.

3

Tilde originally shared the same space on the HOME key of certain keyboards and by association still means home directory.

pear
  • 31
  • 1