Introduction
This lesson is about making filesystems available and taking them away cleanly.
The main question is:
How do you mount a filesystem now, and how do you make it mount automatically later?
What you should be able to do after this lesson:
- Mount and unmount filesystems manually.
- Read and write simple
/etc/fstabentries. - Use labels and UUIDs.
- Understand user-mountable removable media.
- Be aware of systemd mount units.
Big Idea: A Filesystem Is Useful Only After It Is Mounted
Linux does not use a filesystem directly from "just being on a partition". It becomes available when attached to a mount point such as:
//home/mnt/data/media/usb
Manual Mounting
Basic command
sudo mount /dev/sdX1 /mnt
Unmount
sudo umount /mnt
sudo umount /dev/sdX1
Important beginner rule:
- unmount before removing removable media
- if unmount fails, the filesystem may still be in use
Find Filesystem Identity
blkid
blkid
lsblk
lsblk -f
Sanitized example output:
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
zram0 swap zram0 UUID-REDACTED [SWAP]
nvme0n1
|-nvme0n1p1 vfat UUID-REDACTED 807M 21% /boot
|-nvme0n1p2 ext4 UUID-REDACTED 14.4G 65% /
\-nvme0n1p3 ext4 UUID-REDACTED 713.9G 14% /home
What this shows:
lsblk -fcombines device names, filesystem types, and mountpoints- UUIDs are visible and can be used in
/etc/fstab
These help you identify:
- filesystem type
- label
- UUID
Why UUIDs and Labels Matter
Device names can change.
Examples:
/dev/sdb1today may become/dev/sdc1later- UUIDs are usually more stable for mounting
That is why /etc/fstab often uses UUIDs.
/etc/fstab
This file defines filesystems to mount at boot or on demand.
Typical line shape:
UUID=xxxx-xxxx /data ext4 defaults 0 2
Common mount options you should recognize:
defaultsrorwnoautouserusers
Simple column meaning:
- what to mount
- where to mount it
- filesystem type
- mount options
- dump field
- fsck order
Sanitized example output from mount | grep '^/dev/nvme0n1':
/dev/nvme0n1p2 on / type ext4 (rw,nosuid,nodev,relatime)
/dev/nvme0n1p1 on /boot type vfat (rw,nosuid,nodev,relatime,utf8)
/dev/nvme0n1p3 on /home type ext4 (rw,nosuid,nodev,relatime)
What this shows:
- the
mountcommand shows where each filesystem is attached - it also shows mount options such as
rworrelatime
A Sanitized Example
From a real Linux machine, simplified:
Filesystem Type Size Used Avail Use% Mounted on
/dev/nvme0n1p2 ext4 49G 32G 15G 69% /
/dev/nvme0n1p1 vfat 1022M 215M 808M 22% /boot
/dev/nvme0n1p3 ext4 888G 129G 714G 16% /home
This shows which filesystem is mounted where.
Removable Media and User Mounting
Common places:
/media//mnt/
LPIC expects awareness that removable filesystems can be configured as user-mountable.
That is usually done through mount options in /etc/fstab.
Awareness of systemd Mount Units
Modern systems may also use systemd mount units.
You do not need to master them here. The important point is:
mounting can be managed either in classic
/etc/fstabstyle or through systemd unit logic
User-Mountable Removable Media
The objective also mentions user-mountable removable filesystems.
In simple words:
- not every mount action must be root-only
/etc/fstaboptions such asuseroruserscan allow safer user-triggered mounts- this is common for removable media workflows
Practice Step by Step
1) Mount a filesystem manually
- Identify it:
lsblk -f - Create a mount point:
sudo mkdir -p /mnt/data - Mount it:
sudo mount /dev/sdX1 /mnt/data - Verify:
mount | grep /mnt/data
2) Plan an `/etc/fstab` entry
- Get UUID:
blkid /dev/sdX1 - Decide mount point:
/data - Write an entry using UUID instead of
/dev/sdX1.
Note About Lesson Numbering
If you are following the LPIC-1 101-500 lesson numbers carefully, you may notice that the next lesson is 104.5, not 104.4.
That is correct.
Reminder: objective 104.4 was removed from the current LPIC-1 Objectives V5.0, so this course correctly jumps from 104.3 to 104.5.
Cheat Sheet
mount= attach filesystem to mount pointumount= detach filesystem/etc/fstab= persistent mount configurationblkid= show UUID and typelsblk -f= show filesystems and identifiers/media/= common removable-media mount area- UUIDs are usually safer than raw device names
- systemd mount units exist and are worth recognizing
Test Your Knowledge
Complete the quiz to assess your understanding of this course's concepts.
