Detach the filesystem mounted at /mnt/data using the normal procedure.
Open files, processes, and working directories have already been checked.
Which command is appropriate?
umount TARGET detaches the filesystem at the mount point. If it is busy, resolve open files or working directories before retrying.
Detailed explanation
mount /mnt/dataIncorrect. mount attaches a filesystem rather than detaching it.
Incorrect. mount attaches a filesystem rather than detaching it.
unlink /mnt/dataIncorrect. unlink removes a directory entry and is not a mount operation.
Incorrect. unlink removes a directory entry and is not a mount operation.
rmdir /mnt/dataIncorrect. rmdir cannot remove a mounted directory in the intended way.
Incorrect. rmdir cannot remove a mounted directory in the intended way.
umount /mnt/dataCorrect. umount /mnt/data detaches the mounted filesystem.
Correct. umount /mnt/data detaches the mounted filesystem.
Try it yourself
An example you can run in a temporary verification environment.
umount --fake /mnt/dataExpected result
fake指定により実際のumountシステムコールは行わないKey points
- The spelling is umount
- Prefer the mount point
- Resolve busy causes first
Notes
- Environment: util-linux umount 2.39以降
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.