Skip to content
BENIBIX Learn

Home Directory (~)

Infrastructure⌨️ Linux & the Command LineFiles and Folders

Also known as Home Folder, User Home Directory, Tilde (~)

Your own folder on a Linux machine. The sign ~ is short for it.

Think of it like

Think of it like your own bedroom in a big house. Your things go here, and others stay out.

Example

Emma logs in to a server. She starts in /home/emma, where her notes and her .ssh folder are kept.

Why it matters

Your keys, settings and files live here. Most of your work on a server starts in this folder.

Definition

A home directory is the folder that belongs to one user. On Linux it is usually /home and then the user's name. Your files and your personal settings live there. The short sign ~ means your own home folder. When you log in, you start in your home folder. The root user has its own home at /root.

Example code

console
$ echo $HOME
/home/emma
$ cd ~
Ask where home is, then go there. The ~ sign takes you home from anywhere.
The folder /home/emma is Emma's home. The ~ sign points straight at it.

Common mistake

Saving files for a website in your home folder. The web server usually cannot read it there.

Key takeaways

  1. 1
    One per user. Usually /home and the user's name.
  2. 2
    ~ is short for it. cd ~ takes you home.
  3. 3
    You start here. Every login lands in it.

Learn it properly