Get the App
SLTechnology News&Howtos  ›  Servers  › 

What is the skill of mounting mount command?

Shulou Source: shulou.com Published: 2022-06-01 07:57:32 09月30日 Update

This article will explain in detail how to use the mount mount command, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

1. Mount the CD

The command to mount the CD is as follows:

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

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

The command to uninstall the CD is as follows:

# umount / mnt/cdrom

two。 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 uninstall the floppy disk is as follows:

# umount / mnt/floppy

3. Mounting a USB disk is relatively complicated.

First use the "fdisk-l" command to check the device number of the plug-in flash memory, usually / dev/sda1. Then use the "mkdir / mnt/usb" command to create a directory to mount the USB disk. Then use the following command to mount the USB disk in FAT format:

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

Use the following command to mount the USB disk in FAT32 format:

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

4. Mount the partition of the external hard disk

To mount a plug-in hard disk partition (FAT32 format), you also need to use "fdisk-1" to check the device number of the plug-in hard disk partition, assuming / dev/hda1. After the / mnt/vfat mount directory is established, mount it using the following command:

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

Note that by default Linux only allows root users to execute mount commands. If you want the general user to mount the CD or floppy disk automatically when the system starts, you need to modify the / etc/fstab configuration file and add 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 to grant the mount command to the average user.

On the mount mount command is how to share the skills here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Commands CD-ROMs directories floppy disks plug-ins contents formats users hard drives use skills skills files articles more knowledge articles equipment good complex situation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB OPPO Reno MySQL Huawei NVidia