Alex Rivera | Logout

Meaning of tilde in Linux bash (not home directory)

Asked 2009-06-15T21:58:46.560
131

First off, I know that ~/ is the home directory. CDing to ~ or ~/ takes me to the home directory.

However, cd ~X takes me to a special place, where X seems to be anything.

In bash, if I hit "cd ~" and hit tab, it shows a bunch of possible ~X options like ~mail and ~postgres and ~ssh. Going to those folders and doing a pwd shows me that these folders are not in the home directory; they're all over the place.

They are not aliases. I've checked. They're not env. variables, or else they'd require a $.

What is setting these links, and where can I find where these are being set?

Edit
Report

1 Answer

36

Those are the home directories of the users. Try cd ~(your username), for example.

answered 2009-06-15T22:01:16.680

Your Answer