Progress: 0/62 (0%)

πŸ”— Mounting and Unmounting Drives

Mounting and Unmounting Drives

Think of your Linux system like a house, and drives (like USB sticks or extra hard disks) as storage boxes outside your house. To access the stuff inside the box, you need to bring it inside and place it somewhereβ€”that's mounting. When you're done, you put it awayβ€”that's unmounting.

Mounting with mount

What it is: Attaches a drive or partition to a specific directory so Linux can access it.

Analogy: Like placing a storage box on a shelf inside your house so you can grab things from it.

mount /dev/sdb1 /mnt
  • /dev/sdb1 β†’ the drive/partition
  • /mnt β†’ the folder where it will appear

Check Mounted Drives

You can see which drives are currently mounted on your system.

mount | grep /dev/sd

Tip: Modern Linux can auto-mount drives via GUI, but mount is essential for servers or headless setups.

Unmounting with umount

What it is: Detaches a drive so Linux stops using it.

Analogy: Like taking your storage box off the shelf and putting it back outside.

umount /mnt
umount /dev/sdb1

Important: Always unmount before physically removing a drive, or you risk data loss.

Real-life analogy

πŸ’‘ Quick tip:
Mounting = bringing the drive into the house
Unmounting = putting the drive back outside safely