在ubuntu下手工挂载u盘

使用server版本。默认情况下ubuntu不自动挂载u盘。

首先要找到设备名。执行dmesg命令:

dmesg -c

用来清空系统日志缓存。然后插入u盘。

在此执行:

dmesg

看到类似如下信息:

[  813.658014] usb 3-2: new high speed USB device using ehci_hcd and address 3
[  813.809701] usb 3-2: configuration #1 chosen from 1 choice
[  813.816246] scsi4 : SCSI emulation for USB Mass Storage devices
[  813.828488] usb-storage: device found at 3
[  813.828501] usb-storage: waiting for device to settle before scanning
[  818.825125] usb-storage: device scan complete
[  818.826321] scsi 4:0:0:0: Direct-Access              Flash Disk       2.10 PQ: 0 ANSI: 2
[  818.845227] sd 4:0:0:0: [sdb] 2061312 512-byte hardware sectors (1055 MB)
[  818.846010] sd 4:0:0:0: [sdb] Write Protect is off
[  818.846022] sd 4:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[  818.846028] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[  818.851249] sd 4:0:0:0: [sdb] 2061312 512-byte hardware sectors (1055 MB)
[  818.853372] sd 4:0:0:0: [sdb] Write Protect is off
[  818.853390] sd 4:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[  818.853396] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[  818.853438]  sdb: unknown partition table
[  818.859506] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[  818.859619] sd 4:0:0:0: Attached scsi generic sg2 type 0

说明设备名为sdb。

为挂载做准备,创建一个目录:

mkdir /media/usb

使用mount挂载设备:

mount -t vfat /dev/sdb /media/usb

这时u盘已经挂载,可以访问。

使用完毕后,需要卸载:

umount /dev/sdb

相关日志

这篇文章上的评论 RSS feed TrackBack URI

留下评论