$HOME

From Hackepedia
Revision as of 12:43, 5 October 2005 by Sysadmin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Many examples will use $HOME, so this page is here to let you know that on Unix like systems, $HOME is your home directory. If my username was frank, I could do:

$ grep frank /etc/passwd | awk -F: '{print $6}'
/home/frank

I can see my home directory is frank. If I want to go there I can type

 $ cd /home/frank

to change directory there. There are also a few shortcuts to get to your $HOME directory.

 $ cd $HOME

and even easier

 $ ~

will put you there.

cwd

will show you which directory you're currently in.