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