您所在的位置:首页 / 知识分享

Ubuntu如何挂载U盘的方法

2021.02.17

1949

Ubuntu如何挂载U盘的方法

1. 以root用户登陆

2. 查看当前挂载

fdisk -l

一般情况未挂载的硬盘都在最后,这里是/dev/sdb1

3.新建一个目录来挂载硬盘 挂载到MNT/usb

root@h-Default-string:~# cd /mnt
root@h-Default-string:/mnt# mkdir /mnt/usb

4.挂载命令

root@h-Default-string:/mnt# mount /dev/sdb1 /mnt/usb

5.不出问题就会挂载成功。

6.卸载u盘:在使用完u盘后,在拔出前需要先键入卸载U盘命令

umount /mnt/usb 

 

遇到的问题,有进程占用硬盘,我们需要找到进程并kill 

root@h-Default-string:/mnt# mount /dev/sdb1 /mnt/usb
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
root@h-Default-string:/mnt# Mount is denied because the NTFS volume is already e                 xclusively opened.

1) 查看进程

root@h-Default-string:/mnt# fuser -m -u /dev/sdb1 /dev/sdb1: 1977(root)

2)结束进程

root@h-Default-string:/mnt# kill 1977

3)重新挂载一次

root@h-Default-string:/mnt# mount /dev/sdb1 /mnt/usb

完美~

免责声明:以上内容源自网络,版权归原作者所有,如有侵犯您的原创版权请告知,我们将尽快删除相关内容。

相关新闻

让人头疼的python 编码问题!!!

2018.10.29

0

中文编码问题是用中文的程序员经常头大的问题,在python下也是如此,那么应该怎么理解和解决python的编码问题呢?

让人头疼的python 编码问题!!!

2018.10.29

0

中文编码问题是用中文的程序员经常头大的问题,在python下也是如此,那么应该怎么理解和解决python的编码问题呢?

让人头疼的python 编码问题!!!

2018.10.29

0

中文编码问题是用中文的程序员经常头大的问题,在python下也是如此,那么应该怎么理解和解决python的编码问题呢?