Ubuntu server USB flash disk mounting

Source: Internet
Author: User

Ubuntu server cannot read the u disk content. You can only mount the u disk to/mnt,
 
 
 
1. Insert a USB flash drive
 
2. Input fdisk-l/dev/sda to view the output result. For example, mine is like this:
 
# Fdisk-l/dev/sda
Disk/dev/sda: 131 MB, 131104768 bytes
3 heads, 32 sectors/track, 2667 cylinders
Units = cylinders of 96*512 = 49152 bytes
 
Device Boot Start End Blocks Id System
/Dev/sda1*1 2668 128016 6 FAT16
 
NOTE: If your hard disk is a SCSI interface, you may need to change sda to sdb, sdc, sdd, and so on.
 
 
3. After reading the output above, you will know the device where the USB flash disk is located. For example, my device is/dev/sda1, And then I mounted it, if I mount the usb flash drive to the/mnt/usb directory
 
Mount-t auto-o iocharset = cp936/dev/sda1/mnt/usb/
 
 
4. Open/mnt/usb and you will be able to see what is in your usb flash drive!
 
Common parameters include:
 
-T <file system type> specifies the file system type of the device,
 
Common examples: minix linux's earliest File System
 
Ext2 common file systems in linux
 
Msdos MS-DOS fat, is fat16
 
Fat32 commonly used in vfat windows98
 
Nfs Network File System
 
ISO CD-ROM CD standard file system
 
Ntfs windows NT 2000 File System
 
Hpfs OS/2 File System
 
Auto automatically detects the File System
 
-O <option> specifies the option when the file system is mounted. Some of them are also available in/etc/fstab.
 
Commonly used codepage = XXX code page iocharset = XXX Character Set ro is mounted in read-only mode
 
Rw mounting nouser in read/write mode makes it impossible for a general user to mount a user so that a general user can mount a device
 
 
In this way, the default file group in the USB flash drive is root.
 
You can modify the group to which it belongs.
 
 
 
View the uid and gid of the current user xxx
 
Id xxx
 
 
Sudo mount/dev/sdb1/mnt/usb-o uid = 1000, gid = 1000
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.