Show Table of Contents
18.3. Unmounting a File System
To detach a previously mounted file system, use either of the following variants of the
umount command:
umountdirectoryumountdevice
Note that unless this is performed while logged in as
root, the correct permissions must be available to unmount the file system (see Section 18.2.2, “Specifying the Mount Options”). See Example 18.9, “Unmounting a CD” for an example usage.
Important
When a file system is in use (for example, when a process is reading a file on this file system, or when it is used by the kernel), running the
umount command will fail with an error. To determine which processes are accessing the file system, use the fuser command in the following form:
fuser-mdirectory
For example, to list the processes that are accessing a file system mounted to the
/media/cdrom/ directory, type:
~]$ fuser -m /media/cdrom
/media/cdrom: 1793 2013 2022 2435 10532c 10672c
Example 18.9. Unmounting a CD
To unmount a CD that was previously mounted to the
/media/cdrom/ directory, type the following at a shell prompt:
~]$ umount /media/cdrom
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.