How to Safely Eject External Drives in Ubuntu
Safely ejecting external drives in Ubuntu stops your computer from ruining your files or losing your data. Pulling out a USB stick or portable hard drive while Ubuntu 22.04 LTS or newer still writes background data can break the file system beyond repair.
Stopping this hardware protects your work by forcing Ubuntu to finish all open tasks before you unplug the device. You can safely disconnect your drive in just a couple of clicks using the desktop file manager or by typing a quick command in the terminal.
Open the Files application, find your drive in the sidebar, and click the eject icon next to its name. If the drive is busy, close any open files on it first, then click eject.
How to safely eject the external drive in Ubuntu Linux
Protect Your Data Before Unplugging. Open the Files app, then click the small eject icon next to your drive’s name in the sidebar.
Open the Files application by searching for it from the Activities overview.

The File Manager also opens by clicking its icon on the Dock, where it’s open by default. This tool lets you manage your files.
Locate your drive in the sidebar. A small eject icon appears next to its name. Click this icon to remove or eject the device safely.

Right-clicking the device's name in the sidebar and selecting Eject serves as another option.

Open files lock the device in place, triggering a "Volume is busy" warning if you try to disconnect. Cancel the prompt, close out of any active files, and try clicking the eject icon again.
To proceed, click Cancel.
Active files must be closed before clicking the eject icon to remove the device safely.
The setup is complete.
Conclusion:
- Safely ejecting external storage devices in Ubuntu Linux is crucial to prevent data loss or damage.
- Utilize the "Files" application to eject external drives from Ubuntu Linux safely.
- Always ensure that files on the device are closed and not in use by any application before ejecting the device.
- Following these steps will help maintain the integrity of your data and prevent any potential loss or damage to your files.
What is the difference between safely remove drive and eject drive?
"Safely Remove Drive" and "Eject" mean essentially the same thing. The process first unmounts the filesystem (similar to using the `umount` command to disconnect directory trees), then it sends a SCSI eject command, which devices like CD-ROM drives recognize, while most other devices ignore it.
Was this guide helpful?
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.
No comments yet — be the first to share your thoughts!