In its long history, UNIX has developed a reputation for a number of things, including its rather unique sense of humor–have you ever read a collection of its funnier kernel panic messages?!–and its geekiness when it comes to things like cryptically terse commands. Linux, which followed in UNIX’s footsteps, keeps up both traditions.
Here’s a sample of *nix shorthand that refers to a user’s home directory: ~/. Huh? Simple! ~ is just a short method of spelling out /home/username. So let’s say your user name is freddie, then your home directory on the system would be /home/freddie. (Note that this assumes a standard installation using standard, default directories. Your system could have its user accounts on /user or /whatever, in which case your home directory would be /user/freddie or /whatever/freddie, etc.) Okay, since ~ is shorthand for /home/username, adding a / to it, ~/, is just saying everything under the user’s root (home) directory.
As with all things *nix, there are always multiple ways of doing/saying/accomplishing things. Not surprisingly, therefore, we have more than one shortcut method of referring to our home directories! Along with ~/ we also have the environment variable $HOME; type echo $HOME at a prompt and the result will be the name of your home directory, such as /home/freddie.
Now all this talk of home may have you thinking, hmmmmm, there’s no place like home! Here’s a clever way to say it making use of the *nix shorthand mentioned above: There’s no place like ~/. We have this geeky, humorous, sure-to-cause-puzzled-looks slogan on a bunch of products, such as shirts and bumper stickers. Here’s a sample:
Please stop by GroovyGearShop.com for our full selection of Linux, UNIX, and geek slogans on merchandise.
Tags: $HOME, 127.0.0.1, bash, Bourne, computers, GNU, humor, Linux, Linux user, merchandise, operating system, OS, slogans, t-shirts, there's no place like home, unique geek gear, unique gifts for geeks, UNIX, ~/