Skip to content
Follow
Ubuntu Linux

Mount External Storage as Read-Only in Ubuntu

Richard
Written by
Richard
Jan 18, 2023 Updated Aug 13, 2026 2 min read
How to Use Sticky Notes in Windows 11
How to Use Sticky Notes in Windows 11

Mounting external storage as read-only in Ubuntu locks your files so you cannot change or delete them by mistake. This setup lets you open and copy everything on a USB drive or hard disk, while stopping any new data from being saved or edited.

Ubuntu normally lets you read and write to any plugged-in drive right away. Setting a drive to read-only gives you extra safety for important backups or shared files.

⚡ Quick Answer

Open the Terminal and run `gsettings set org.gnome.desktop.lockdown mount-removable-storage-devices-as-read-only true`. To allow writing again, use `gsettings set org.gnome.desktop.lockdown mount-removable-storage-devices-as-read-only false`.

Enable or disable mounting external storage devices as read-only

Ubuntu allows mounting external storage devices as read-only. Viewing files on USB sticks or external hard drives works normally, but altering or deleting them remains restricted. This read-only mounting serves as a safety feature, preventing accidental data loss.

System modifications require using the Ubuntu Terminal. Launch this interface by pressing the Super key and searching for ‘Terminal,’ or use the keyboard shortcut Ctrl+Alt+T.

Ubuntu Linux activities overview Terminal search
Ubuntu Linux activities overview Terminal search

Run the following command in the terminal to make all external drives read-only:

⚠️Warning
gsettings set org.gnome.desktop.lockdown mount-removable-storage-devices-as-read-only true

Reverting this behavior to permit writing requires running a different command:

gsettings set org.gnome.desktop.lockdown mount-removable-storage-devices-as-read-only false

Enable or Disable mounting storage devices as read-only devices using the Dconf Editor

The Dconf Editor tool acts as a visual settings manager for the system, letting users change configuration values without typing terminal commands. Installing the utility comes first before making any configuration changes.

Installing the tool requires running this command in the terminal:

sudo apt update && sudo apt install dconf-editor

Learn more about software management via the guide on How to add or remove software on Ubuntu Linux.

ubuntu linux decon editor install
Ubuntu Linux decon editor install

Launch Dconf Editor from the app menu after completing the installation. Navigate through the following schema path: org -> gnome -> desktop -> media-handling

Locate the setting labeled "mount-removable-storage-devices-as-read-only" and toggle the switch to "On."

Ubuntu Linux enable or disable mount removable storage devices as read only
Ubuntu Linux enables or disables mounting removable storage devices as read-only.

Enforcing read-only status on external storage stops any connected USB drive from accepting new writes. Notifications or lock icons appear to signal that writing to the device remains blocked.

Ubuntu Linux usb ready only display
Ubuntu Linux USB ready only display

Conclusion

Controlling whether external drives mount as read-only on an Ubuntu computer helps prevent accidental file modifications.

Questions or assistance requests belong in the comment section below.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Enable or Disable Access to Removable Storage Devices in Windows 11
Windows How to Enable or Disable Access to Removable Storage Devices in Windows 11
How to Install Additional Software on Ubuntu
Ubuntu Linux How to Install Additional Software on Ubuntu
How to Uninstall Software in Ubuntu Linux
Ubuntu Linux How to Uninstall Software in Ubuntu Linux
How to Disable Logout on Ubuntu Desktop
Ubuntu Linux How to Disable Logout on Ubuntu Desktop

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *