In Linux Systems, the file system is not mounted and cannot be used. Mount, which is to make the file system available in the operating system. The Mount command is used in Linux to mount the file system, with both persistent mounts and temporary mounts.
1. Permanent mount:
Modify the configuration file /etc/fstabtowrite the file system you want to mount in this configuration file, and then use the command
Mount-a Let the configuration information take effect, the mounted file can be used.
To/etc/fstab the contents of the configuration file, the circled line is the information we need to add.
Once mounted, you can use mount to view relevant information and use the command df-h to view the available partitions.
2. Temporary mounts:
MOUNT-T file format mount file mount directory
such as:mount-t ext3/dev/sdb1/opt
Then use the command mount-a to make the mount effective, and the mounted file can be used.
Note: Temporary mounted file systems are disabled when the operating system restarts and cannot be used.
3. Mount can also be used to mount file systems, optical drives, floppy disks,U disks, image files, and so on.
(1) mount the optical drive:
Mount/media/cdrom
(2) Mount u disk:mount-t u disk file format u - disk partition mount directory
such as:mount-t vfat/dev/sdc1/media/usb
(If the operating system has only two drives, the disk block of the U disk is SDCand can be viewed in the/ dev directory)
(3) Mount image file:mount-o loop image file path mount directory
such as:mount-o loop/home/aa.iso/media/iso
4. Unmount the mounted file system:
Umount Mount Directory
such as:umount/opt
Linux system mount operation Mount detailed