Linux command (*): Mount/umount command

Source: Internet
Author: User

You can use Fdisk-l to view your hard disk partition before using a hanging disk.

Command format:

Mount [-t vfstype] [-O options] Device dir

-T Vfstype specifies the type of file system. Common types are:

Disc or disc Image: iso9660

DOS FAT16 file system: MSDOS

Windows 9x FAT32 file system: VFAT

Windows NT NTFS file system: NTFS

Mount Windows file network share: SMBFS

UNIX (LINUX) file network share: NFS

1. Mount the disc image file

# Mkdir/mnt/vcdrom

# Mount-o Loop-t Iso9660/home/sunky/mydisk.iso/mnt/vcdrom

2. Mount the removable hard drive

#mkdir-P/MNT/USBHD1

#mkdir-P/MNT/USBHD2

Note: Create a directory to use as a mount point

#mount-T NTFS/DEV/SDC1/MNT/USBHD1

#mount-T VFAT/DEV/SDC5/MNT/USBHD2

Note: For NTFS-formatted disk partitions, you should use the-T NTFS parameter, and the-T VFAT parameter should be used for disk partitions in FAT32 format. If the kanji file name is displayed as garbled or not displayed, you can use the following command format.

#mount-T Ntfs-o iocharset=cp936/dev/sdc1/mnt/usbhd1

#mount-T Vfat-o iocharset=cp936/dev/sdc5/mnt/usbhd2

Using the Fdisk partitioning command and the Mkfs file system creation command under the Linux system, the partition of the removable hard disk can be made into the ext2, ext3 format peculiar to the Linux system. This makes it easier to use under Linux. Use the following command to hook up directly.

#mount/DEV/SDC1/MNT/USBHD1

3. Mount USB Drive

#mkdir-P/MNT/USB

#mount-T Vfat/dev/sdd1/mnt/usb

4. Mount Windows file Share

# Mkdir–p/mnt/samba

# mount-t Smbfs-o username=administrator,password=pldy123//10.140.133.23/c$/mnt/samba

Note: Administrator and pldy123 are a user name and password for the IP address of the 10.140.133.23 Windows computer, and C $ is a disk share for this computer.

Uninstalling device: UMOUNT/MNT/USB

Linux command (*): Mount/umount command

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.