1. Identify the Drive

List block devices:

lsblk -f

Or, if you want less noise:

sudo blkid

You’re looking for:

  • UUID (don’t use /dev/sdX, that’s amateur hour)
  • Filesystem type (ext4, xfs, ntfs, vfat, etc.)

Example:

/dev/sdb1: UUID="3e6c3f8e-9d7f-4b7b-9a61-9e9d9c9a1111" TYPE="ext4"

2. Create a Mount Point

Pick a sane location. /mnt or /media — not your home directory like a barbarian.

sudo mkdir -p /mnt/data

Set ownership if this is a user drive:

sudo chown -R $USER:$USER /mnt/data

3. Edit /etc/fstab

Open the file:

sudo nano /etc/fstab

Append a new line at the bottom.

Example: ext4 Drive

UUID=3e6c3f8e-9d7f-4b7b-9a61-9e9d9c9a1111  /mnt/data  ext4  defaults,noatime  0  2

What Each Field Means (Briefly)

UUID=<device-uuid>   <mount-point>   <fs-type>   <options>   <dump>   <fsck>
  • UUID: stable, survives reboots
  • mount-point: where it shows up
  • fs-type: ext4, ntfs, xfs, vfat… don’t guess
  • options: defaults is fine, noatime avoids useless writes
  • dump: always 0
  • fsck: 2 for data drives, 1 only for root

4. Common Filesystem Examples

NTFS (External / Shared with Windows)

UUID=XXXX-YYYY  /mnt/windows  ntfs  defaults,uid=1000,gid=1000,noatime  0  0

Install driver if needed:

sudo apt install -y ntfs-3g

FAT / USB Drives

UUID=ABCD-1234  /mnt/usb  vfat  defaults,uid=1000,gid=1000,noatime  0  0

5. Test Before Reboot (Seriously)

Run:

sudo mount -a

If:

  • You get errors → fix them now
  • No output → you didn’t screw it up

Check:

df -h

If the drive shows up, you’re good.


6. Safety Tips (Read This)

  • One typo in fstab can brick your boot
  • Always keep a live USB nearby
  • For optional drives (USB, HDD that may be unplugged), use:
nofail,x-systemd.device-timeout=5s

Example:

UUID=XXXX  /mnt/backup  ext4  defaults,nofail,noatime  0  2

Now Debian won’t hang like an idiot if the disk is missing.


7. Result

  • Drives mount automatically at boot
  • No desktop dependency
  • Works on servers, minimal installs, XFCE, anything

This is how Linux is supposed to be used.


Notes

  • Want encryption? Use LUKS before fstab
  • Want automount on access? That’s systemd.automount
  • Want GUI solutions? Wrong blog

Done. Simple. Predictable. Boring — in the best way.