On Fedora, accessing additional disk partitions (like a separate storage or workspace) often requires entering your password. This guide explains how to auto-mount partitions at boot without a password, and have them appear in the GNOME Files app, similar to how drives show in Windows.
We’ll cover two methods:
- Mounting under
/mnt
(clean layout, requires shortcut for GUI visibility) - Mounting under
/media
(auto-visible in GNOME Files sidebar)
🧭 Step 1: Identify Your Partition
In a terminal, run:
lsblk -f
or:
sudo blkid
Look for entries like:
/dev/sdXn: LABEL="YourLabel" UUID="XXXX-XXXX" TYPE="ext4"
Take note of:
UUID
-
LABEL
(optional) - Filesystem type (e.g.
ext4
,ntfs
,btrfs
)
🛠️ Step 2: Choose Your Mount Method
✅ Option 1: Mount Under /mnt
(Clean System Layout)
This method is clean and system-friendly but requires a shortcut to access from the GUI.
1. Create Mount Point
sudo mkdir -p /mnt/YourMountPoint
Replace YourMountPoint
with a name like workspace
or storage
.
2. Edit /etc/fstab
Open the file:
sudo nano /etc/fstab
Add a line like this:
UUID=XXXX-XXXX /mnt/YourMountPoint ext4 defaults 0 2
Replace:
-
UUID=XXXX-XXXX
with your actual UUID -
ext4
with your actual filesystem type -
YourMountPoint
with your chosen name
3. Mount Immediately
sudo mount -a
4. Add GUI Shortcut (Optional)
ln -s /mnt/YourMountPoint ~/YourMountPoint
This creates a visible folder shortcut in your home directory.
✅ Option 2: Mount Under /media
(Visible in GNOME Files Sidebar)
This method makes partitions show up automatically in the Files app.
1. Create Mount Point
sudo mkdir -p /media/YourMountPoint
2. Edit /etc/fstab
sudo nano /etc/fstab
Add a line like:
UUID=XXXX-XXXX /media/YourMountPoint ext4 defaults 0 2
3. Mount:
sudo mount -a
Open Files app — you’ll now see the partition in the left sidebar.
🔑 Step 3: Set Permissions (Optional)
To ensure you have read/write access:
sudo chown -R $USER:$USER /mnt/YourMountPoint
or if using /media
:
sudo chown -R $USER:$USER /media/YourMountPoint
✨ Optional: Change Partition Label
To customize the name that appears in the GUI:
sudo e2label /dev/sdXn NewLabel
Replace sdXn
with your device (like sda3
) and NewLabel
with your desired label.
🧹 To Undo or Remove
- Delete or comment the corresponding line in
/etc/fstab
- Unmount the partition:
sudo umount /mnt/YourMountPoint
- Remove mount point or symlink as needed
✅ Summary
Feature |
/mnt Method |
/media Method |
---|---|---|
Auto-mount on boot | ✅ Yes | ✅ Yes |
GUI (Files) visibility | ❌ Needs symlink | ✅ Sidebar visibility |
Password prompt | ❌ No | ❌ No |
Use case | Clean setup, scripting | Windows-style file access |
💡 Pro Tip
Always back up your /etc/fstab
before editing:
sudo cp /etc/fstab /etc/fstab.bak
Top comments (0)