

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: What Is a Filesystem?
incomplete
2: Filepaths
incomplete
3: Parent Directories
incomplete
4: Absolute vs. Relative Paths
incomplete
5: Files
incomplete
6: Tab Completion
incomplete
7: head and tail
incomplete
8: More and Less
incomplete
9: Touch
incomplete
10: Directories
incomplete
11: Move
incomplete
12: Remove
incomplete
13: Copy
incomplete
14: Home
incomplete
15: Grep
incomplete
16: grep Multiple Files
incomplete
17: Find
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
In a Unix-like operating system, a user's home directory is the directory where their personal files are stored. It is also the directory that a user starts in when logging into the system.
I recommend doing all of your development work in your home directory. For example, I like to create a workspace directory in my home directory, and all my programming projects live in subdirectories there.
Your home directory is where you want to spend most of your time. Many of the other directories on your machine are critical to the operating system or other programs. Be careful when working in other directories like /bin, /etc, /var, etc.
You can mess up your system if you're not careful.
$HOME VariableThe $HOME environment variable contains the absolute path to your home directory:
echo $HOME
My home directory (on Mac) is located at /Users/wagslane.
~ AliasThe ~ character is an alias for your home directory. So when I want to go home, I don't have to type out cd /Users/wagslane or cd $HOME, I can just type:
cd ~