在 bash 中卸载我的外置硬盘
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18092343/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unmount my external hard drive in bash
提问by Dennis
So, this should apparently be really simple, but had trouble finding any good answers online.
所以,这显然应该很简单,但很难在网上找到任何好的答案。
I have a mounted external usb hard drive.
我有一个安装的外部 USB 硬盘驱动器。
I would like to unmount it, using bash. (Essentially I'm just looking for the equivalent bash command for right clicking on my external hard drive in nautilus and selecting 'unmount')
我想使用 bash 卸载它。(本质上,我只是在寻找等效的 bash 命令,以便在 nautilus 中右键单击我的外部硬盘并选择“卸载”)
How can I achieve this?
我怎样才能做到这一点?
回答by SWPhantom
Searching for "Unmount Hard Drive Terminal" yields http://ubuntuforums.org/showthread.php?t=842698.
搜索“卸载硬盘终端”会产生http://ubuntuforums.org/showthread.php?t=842698。
russlar provides a solution:
russlar 提供了一个解决方案:
open terminal, and run
df -h
. this will tell you all the hard drives mounted. then, runsudo umount /dev/<something>
, where<something>
is the name of the hard drive that you want to unmount.
打开终端,然后运行
df -h
。这将告诉您安装的所有硬盘驱动器。然后,运行sudo umount /dev/<something>
,其中<something>
是要卸载的硬盘驱动器的名称。