The Linux file system combines all the media disks into a virtual directory. Before using the new media disk, you need to put it in a virtual directory. This task is called mounting!
Mount command: used to mount media
[[Email protected] ~] # Mount
/Dev/mapper/VolGroup00-LogVol00 on/type ext3 (rw)
Proc on/proc type proc (rw)
Sysfs on/sys type sysfs (rw)
Devpts on/dev/pts type devpts (rw, gid = 5, mode = 620)
/Dev/sda1 on/boot type ext3 (rw)
Tmpfs on/dev/shm type tmpfs (rw)
None on/proc/sys/fs/binfmt_misc type binfmt_misc (rw)
Sunrpc on/var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
The mount Command provides four messages:
Device location of the media
Mount point of the media in the virtual directory
File system type
Access Status of mounted Media
Vfat: windows persistent file system (USB)
Ntfs: windows Advanced File system
ISO: Standard CD-ROM file system (CD)
For example, manually mount the USB on the device/dev/sdb1 to the/media/disk location.
Mount-t vfat/dev/sdb1/mdeia/disk
Parameters |
Description |
- |
Mount all the file systems specified in the/etc/fstab file |
-F
|
Use the mount command to simulate mounting a device. |
-F |
When connected to the-a parameter, all file systems are mounted at the same time. |
-V |
Detailed mode: describes the steps required to attach a device |
-I |
Do not use any file system help in/sbin/mount. filesystem |
-L |
Automatically add tags for ext2, ext3, and xfs file systems |
-N |
Mount the device, but not register it in the/etc/mstab mount device file |
-P num |
For encrypted mounting, passphrase is read from the file descriptor num. |
-S |
Ignore mounting options not supported by the file system |
-R
|
Mount devices in read-only mode |
-W |
Mount devices in read/write mode |
-L label |
Mount the device with the specified label |
-U uuid |
Mount the device with the specified uuid |
-0 |
When connected to the-a parameter, restrict the use of the file system set |
-O |
Add specific options to the file system |
The-o option allows you to mount a file system with a comma-separated option. Common options include:
Ro: Read-only mounting
Rw: read/write mounting
User: allows common users to Mount file systems.
Check = none: Mount the file system without performing the integrity check.
Loop: Mount a file
Mount the. iso file to the virtual directory:
[[Email protected] mnt] # mount-t iso9660-o loop file name mnt
Loop device is a virtual block device formed by shadow normal files on the operating system.
Umount command
Remove a removable media device. You should not simply remove it from the system, but uninstall it first! In linux, the mounted CD is not allowed to pop up!
Umount [directory | device]
[[Email protected] mnt] # umount/home/ley/mnt
This article is from the "linux O & M sharing" blog, please be sure to keep this source http://liangey.blog.51cto.com/9097868/1572811
Mount command