How To Forcefully Eject A USB Stick In Windows And Linux

You plugged in a USB Flash drive, copied some files, and then tried to eject the drive.
But Windows says openly that it doesn't like you. So sad.

This can occur when some processes running in the background are accessing your USB drive. You cannot simply pull out the thumb drive, because you risk corrupting the data in it.

Until now, your only way seemed to be shutting down the computer. Not any more, for here comes a very nifty little utility. Read along to find out more.

EjectUSB is an extremely tiny (250 KB) utility that finds out what all applications are using the USB disk, kills them all mercilessly and releases your disk from the Windows jail, all within a matter of seconds.
All you have to do, is download the zip archieve, extract it to your USB disk and run the executable. Visit this link to watch a video of EjectUSB in action.

Now, how to achieve the same in Linux?
In Linux, the procedure is a bit simple because you don't have to download any new utility. The program that you are going to use, called fuser comes pre-installed in almost all distros.

If you are unable to unmount the disk using the GUI in GNOME or KDE, just open up a terminal and run sudo fuser -k /media/usbdrive. Change /media/usbdrive to where your USB drive is mounted.
This command kills all processing accessing your usb drive and then a simple eject command from your GNOME or KDE explorer will do the trick.

Note: In both Windows and Linux, remember to close all unsaved files in USB drive before attempting these.