linux怎么挂载U盘
插入U盘之后,按照下面的步骤:
 
如果想让linux识别U盘,需要把鼠标先定位在虚拟机的linux里面,然后插入优盘,优盘才会被linux识别,再用fdisk -l 来查看U盘的情况。
 
 
  
  1. [root@mysql-1 ~]# fdisk -l 
  2.   
  3. Disk /dev/sda: 21.4 GB, 21474836480 bytes 
  4. 255 heads, 63 sectors/track, 2610 cylinders 
  5. Units = cylinders of 16065 * 512 = 8225280 bytes 
  6.   
  7.    Device Boot      Start         End      Blocks   Id  System 
  8. /dev/sda1   *           1          13      104391   83  Linux 
  9. /dev/sda2              14        2610    20860402+  8e  Linux LVM 
  10.   
  11. Disk /dev/sdb: 3984 MB, 3984411648 bytes 
  12. 5 heads, 42 sectors/track, 37057 cylinders 
  13. Units = cylinders of 210 * 512 = 107520 bytes 
  14. ----------------------------------------------------------------------- 
  15.    Device Boot      Start         End      Blocks   Id  System 
  16. /dev/sdb1               6       37058     3890439    b  W95 FAT32 
  17. ----------------------------------------------------------------------- 
如果是fat格式的U盘,挂载命令:
 
 
  
  1. mount  -t  vfat  /dev/sdb1  /mnt/udisk  
如果是ntfs格式的U盘,挂载命令:
 
 
  
  1. mount  -t  ntfs-3g  /dev/sdb1  /mnt/udisk 
如果没有/mnt/udisk文件夹,可以创建一个
 
 
  
  1. mkdir /mnt/udisk 
即可~
 
但是注意,ntfs格式要挂载的话,需要下载一个ntfs-3g-2011.4.12-5.el5.i386.rpm包,安装一下~
 
一、编译安装fuse模块
 
 
  
  1. Download fuse-2.7.0.tar.gz  
  2. In root terminal 
  3. # tar –zxvf fuse-2.7.0.tar.gz 
  4. # cd fuse-2.7.0 
  5. # ./configure 
  6. # make 
  7. # make install 
  8. # lsmod 
  9. # modprobe fuse 
 
二、安装ntfs-3g软件
 
 
  
  1. Then (re)configure and install ntfs-3g 
  2. # tar –zxvf ntfs-3g-1.5130.tar.gz 
  3. # cd ntfs-3g-1.5130 
  4. # ./configure -–enable-fuse-module 
  5. # make 
  6. # make install 

三、挂载
 
 
  
  1. Then mount your ntfs drive in linux. 
  2. # fdisk -l(搜索出移动硬盘) 
  3. # mkdir /mnt/windows 
  4. # mount –t ntfs-3g /dev/sda1 /mnt/windows 
  5. Now, you can Read/Write NTFS formatted drive in Linux. 
  6. Hope This help you. 
  7.