Safely detach the filesystem mounted at /srv/docs.
No process is using it.
Which command is appropriate?
umount TARGET detaches a mount. Open files or a process working in the mount can cause a busy error.
Detailed explanation
umount /srv/docsCorrect. umount /srv/docs detaches the mounted filesystem.
Correct. umount /srv/docs detaches the mounted filesystem.
mount /srv/docsIncorrect. mount attaches a filesystem.
Incorrect. mount attaches a filesystem.
rm -rf /srv/docsIncorrect. Removing the directory does not unmount the filesystem.
Incorrect. Removing the directory does not unmount the filesystem.
swapoff /srv/docsIncorrect. swapoff is for swap areas rather than ordinary filesystems.
Incorrect. swapoff is for swap areas rather than ordinary filesystems.
Try it yourself
An example you can run in a temporary verification environment.
umount --help | sed -n '1,14p'Expected result
filesystemをunmountする使用法Key points
- The command is spelled umount
- Check busy users
- It does not delete files
Notes
- Environment: util-linux umount / ヘルプ表示のみ
- 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.