linux下如何使用U盘啊?

来源:百度知道 编辑:UC知道 时间:2024/05/11 03:25:03
linux下如何使用U盘?要大家亲自试过可以做得到的,网上类如“mount -t vfat /dev/sdb /mnt/usb”我都试过了,不行啊!
请大家教我!
谢谢!
我再试试看吧,Linux版本是Redhat9.0

是不是挂上U盘后,U盘的内容就在/mnt/usb下啊?
还有,我插上U盘后,在硬件浏览中可以看到/dev/sda1,但是通过命令/sbin/fdisk -l却没有看到/dev/sda1,
我输入/mount -t vfat /dev/sda1/mnt/usb后,也运行了,出现:
device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options].
For many more details, say man 8 mount .

但是在/mnt/usb中还是没有内容啊!是哪里出错了?

我知道的你问题出在哪里。
mount是挂载usb的命令,只是后面被挂载的对象没写对。而且挂载对象不存在
正确做法如下:

插好usb之后
先用disk -l命令看一下你的usb设备名称是什么,列出的表格里面有fat格式的就是你的usb设备名字,可能是sda1,或者sda2什么的
假设是sda1的话


mount -t vfat /dev/sda1(注意这里是你usb在linux设备名) /mnt/

就可以了。

然后进入mnt目录就是你usb内容了。

如果是是桌面版,如fedora或ubuntu等,插入U盘后,系统会自动帮你挂载到/media目录下,并分配一个随机的长长的路径名。如果是服务器版,可能不会自动挂载,需要你手动挂载,方法是开一个终端,输入mkdir /media/usb-flash, 回车,再输入mount -t msdos /dev/sdb1 /media/usb-flash 然后/media/usb-flash路径就是你的U盘文件了。

光mount不行,要先创建/mnt/usb(或其他)目录,然后再mount

网上的方法是对的,我用mount命令绑定过U盘,移动硬盘,都是可以做到的. 如果你绑定失败,说明你对这个命令不太清楚.
由于不知道你linux版本,目录结构,还有你到底是什么地方"不行啊" 这些信息,不太好判断问题出在哪.