Linux Mounted Discs

Source: Internet
Author: User

Mount-t Iso9660/dev/cdrom/mnt/cdrom

Umout/mnt/cdrom

To view a file system that has been mounted by the system

Mount

Output format for each line:

Partition name on mount point type File system type (mounted option)

When using a CD, floppy disk, or USB flash drive, the mount command must be executed on the Linux system. The mount command assigns these storage media to a directory in the system and then directly accesses the

The data on the storage media can be read and written in the directory.

  

1. Mount the disc

  

The command to mount the disc is as follows:

  

# mount-t Is09660/dev/cdrom/mnt/cdrom

  

This command mounts the disc to the/mnt/cdrom directory and uses the "Ls/mnt/cdrom" command to display the data and files on the disc.

  

The command to unmount the disc is as follows:

  

# Umount/mnt/cdrom

Mount image ISO File

#mount-O Loop/tmp/linux.iso/mnt/linux

Or:

#mount-O Loop,ischarset=gb2312/tmp/linux.iso/mnt/linux

  

2. Mounting floppy disk

  

The command to mount the floppy disk to the/mnt/floppy directory is as follows:

  

# Mount/dev/fd0/mnt/floppy

  

The command to unmount the floppy disk is as follows:

  

#umount/mnt/floppy

  

3. Mounting a USB flash drive is relatively complex.

  

First, use the "fdisk-l" command to see the device number of the external flash, typically/dev/sda1. Then use the "MKDIR/MNT/USB" command to create a directory to mount a USB flash drive. After

Mount the FAT-formatted USB drive using the following command:

  

# mount-t Msdos/dev/sda1/mnt/usb

  

Mount the USB flash drive in FAT32 format using the following command:

  

# mount-t Vfat/dev/sda1/mnt/usb

  

4. Mount the external hard disk partition (local partition)

  

Mount external hard disk partition (FAT32 format) also need to first use "fdisk-1" to see the external hard disk partition device number, assuming that the/dev/hda1. After establishing the/mnt/vfat mount directory,

Mount using the following command:

  

# mount-t Vfat/dev/hda1/mnt/vfat

Mount the Windows partition on the local system and mount one of the file systems

#mkdir/mnt/d

#mount-T Ntfs-o iocharset=gb2312/dev/hdc5/mnt/d

where NTFS is NTFS partition iocharset=gb2312 is to support Chinese, if Chinese is already supported, you can use

#mount-T ntfs/dev/hdc5/mnt/d

#mount-T VFAT/DEV/HDC5/MNT/D mount FAT32 format partition

  

5. Mount the shared directory for Windows

On a local area network, computers with more than one Windows operating system are typically

Map the Windows file system to the Mount command format of the file system

#mount-T smbfs-o username= user name, password= password share name mount point

Such as:

#mount-T Smbfs-o username=rq,password=1234//dz118/software/mnt/software

Note that Linux only allows the root user to execute the Mount command by default. If you want the average user to be able to mount, and you want to mount the disc or floppy disk automatically when the system starts, you need to

Modify the/etc/fstab configuration file to include the following:

  

label=//ext3 Defaults 11

/dev/cdrom/mnt/cdrom iSo9660 auto,owner,kudzu,ro,user 00

/dev/fdo/mnt/floppy Auto Auto,owner,kudzu,ro,user 00

  

Where "user" means that the mount command is given to the general user.

  

The/etc/fstab file is detailed in the Linux Help manual, so you might want to take a look at it.

Linux Mounted Discs

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.