← Back to Blogs

Understanding Linux Basics β€” Filesystem, Users, Root, and Important Directories.

Harsh Ranjan JhaWritten by Harsh Ranjan JhaPublished on 2026-05-01Β·4 min read

When you open a Linux terminal for the first time, you might see something like:

/home/username $

or sometimes:

~ $

At first, this can be confusing.

πŸ‘‰ What is /?
πŸ‘‰ What does ~ mean?
πŸ‘‰ Who is username?
πŸ‘‰ And what is this β€œroot” everyone talks about?

Let’s understand all of this step by step in a simple way.

🌳 Linux Does Not Use C:, D: Drives

In Windows, files are organized into drives like C:, D:.

Linux works differently.

πŸ‘‰ It uses a single filesystem structure that starts from:

/ β€” Root Directory

This is the top-most directory in Linux.

Everything exists inside /.

/
β”œβ”€β”€ home
β”œβ”€β”€ bin
β”œβ”€β”€ etc
β”œβ”€β”€ usr

Think of / as the starting point of the entire system.


🧍 What is username? (Users in Linux)

Linux is a multi-user system, meaning:

  • Multiple users can exist on one system

  • Each user has their own space

When a user is created, Linux automatically creates:

/home/username

πŸ‘‰ This is the home directory of that user.


🏠 What is ~?

Instead of writing the full path:

/home/username

Linux provides a shortcut:

~

πŸ‘‰ ~ represents the current user’s home directory

So:

  • cd ~ β†’ goes to home

  • pwd β†’ shows /home/username .


πŸ‘‘ Understanding β€œroot” (Very Important)

This is where many beginners get confused.

There are two meanings of β€œroot” in Linux:

  1. / β†’ Root Directory Top of the filesystem Everything starts from here

  2. root β†’ Root User (Administrator) A special user with full control Can access and modify anything in the system.

Its home directory is:

/root

⚠️ Important:

  • / β‰  /root

  • / β†’ whole system

  • /root β†’ admin user’s home


    Important Directories


    πŸ“¦ /bin β€” Basic Commands

    πŸ‘‰ Command:

    ls /bin | head
    

    πŸ‘‰ Output:

    bash
    cat
    cp
    ls
    mkdir
    mv
    rm
    touch
    

    πŸ‘‰ These are basic commands used daily.


    βš™οΈ /sbin β€” System Commands

    πŸ‘‰ Command:

    ls /sbin | head
    

    πŸ‘‰ Output:

    reboot
    shutdown
    mount
    fsck
    ifconfig
    

    πŸ‘‰ Mostly used by admin.


    πŸ“š /usr β€” Installed Programs

    πŸ‘‰ Command:

    ls /usr
    

    πŸ‘‰ Output:

    bin
    lib
    share
    

    πŸ‘‰ Check programs:

    ls /usr/bin | head
    

    πŸ‘‰ Output:

    python3
    node
    gcc
    git
    vim
    

These are installed tools.


🏠 /home β€” Users

πŸ‘‰ Command:

ls /home

πŸ‘‰ Output:

user1
user2

πŸ‘‰ Enter a user:

cd /home/user1
ls

πŸ‘‰ Output:

Documents
Downloads
Pictures

πŸ“ /etc β€” Configuration

πŸ‘‰ Command:

ls /etc | head

πŸ‘‰ Output:

passwd
hosts
hostname
group

πŸ‘‰ View users:

cat /etc/passwd | head

πŸ‘‰ Output:

root:x:0:0:root:/root:/bin/bash
user:x:1000:1000::/home/user:/bin/bash

πŸ‘‰ Shows user details.


πŸ—‘οΈ /tmp β€” Temporary Files

πŸ‘‰ Command:

cd /tmp
touch demo.txt
ls

πŸ‘‰ Output:

demo.txt

πŸ‘‰ File may disappear after reboot.


πŸ“Š /var β€” Logs

πŸ‘‰ Command:

ls /var/log | head

πŸ‘‰ Output:

syslog
auth.log
kern.log

πŸ‘‰ View log:

cat /var/log/syslog | head

πŸ‘‰ Output:

May 1 10:00:01 system started
May 1 10:01:22 login success

πŸ”Œ /dev β€” Devices

πŸ‘‰ Command:

ls /dev | head

πŸ‘‰ Output:

null
tty
sda
random

πŸ‘‰ Represents hardware.


⚑ /proc β€” System Info

πŸ‘‰ Command:

cat /proc/cpuinfo | head

πŸ‘‰ Output:

processor : 0
vendor_id : GenuineIntel
cpu MHz   : 2400.000

πŸ‘‰ Memory:

cat /proc/meminfo | head

πŸ‘‰ Output:

MemTotal:  8000000 kB
MemFree:   2000000 kB

🧠 Key Takeaways

  • / is the root directory

  • ~ is home directory

  • Linux supports multiple users

  • Each directory has a purpose

  • Commands help explore everything


⚠️ Common Mistakes

  • Confusing / and /root

  • Running dangerous commands

  • Ignoring system structure.