It sometimes prompts “Device is busy” while unmounting a disk with umount command. This is because there’s a running process is using the file mounted from the disk. To get over “device is busy” and umount this disk, we need to find out and kill the process.

To find out what device is busy, fuser command may help!

For example, assume that a disk is mounting on /media/floppy and you get “device is busy” while running umount /media/floppy command. Now, use this command:

fuser -m /media/floppy

It outputs something like this, and it means process 2612(pid) is using the device.

/media/floppy: 2612c

here “c” means:
* c: current directory.
* e: executable being run.
* f: open file. f is omitted in default display mode.
* F: open file for writing. F is omitted in default display mode.
* r: root directory.
* m: mmap’ed file or shared library.

Now, get details about this process and kill the process using:

ps aux |grep 2612
kill -9 2612

And continue un-mounting the disk.