Reprinted -linux mount means

Mounting:
Liunx tree-like file management system, which is in the Linux system, can be said to have no concept of partition. Like the Linux partitions and other devices are just one file. To use a partition it must be loaded into the file system. This may be difficult to understand, read on.
Linux in the tree file structure, the top level is / directory. When installing the system, you must select a primary partition to mount in the / directory, because the system needs to be installed in the / mount a primary partition. Otherwise, the system will prompt you. Once again it referred to the mount. It is to mount the directory partition and are connected, and the mapping relationship under above said WINDOWS is the same. The difference is that WINDOWS is to map a drive letter to the partition, and the next LINUX is mapped to a directory. It is most important to understand their different places, which led to different because of the different file system structure.
It says the Linux file system tree, the system must be installed in the / directory as the / directory to mount a primary partition. / Directory is the root of a tree, all other directories are his children. We have the time to install the system partition to mount 1 / under the directory. And this time did not mount any other partitions, so all other directories under the / directory in this partition, that is to say, I in any directory the actual read and write operations are a number of partitioning. If we want to use the other partition, the partition would have to mount a directory to the directory, the directory may already exist, such as / home, also can be a directory that we've created, such as / oracle. Of course, some directory such as / lib, / dev, / etc , / usr these can not mount other partitions because they are stored with the file system needs, once mounted the other partition, no OS that can not find the required files , the system will collapse. For example, we mount the partition 2 to the next / usr / X11 directory, the system can not find the file on the partition by 1 X11 directory, this time the system will not be able to use a graphical interface. While the file is still on your hard disk. As mentioned above, the directory partition is --- by linking them to mount it. You replace the partition, it undermines the contact, you can not find the file before. We look at the partition 5 and 6 partitions, we mount it under / home / ftp and / oracle directory, this time we are operating in these two directories that is used for the operation of the district.
And not so complicated WINDOWS she is not using a tree structure, each partition corresponds to a letter, once established, can not modify the mapping relations. In fact, LINUX each mount a WINDOWS directory partition is equivalent to the system drive letter, such as the above, / home / ftp and / oracle directory we can see her as a drive letter and a partition associate, just because LINUX file system, making her more flexible, so it is more complex and difficult to understand.
df command to view the partition mounted case, fdisk command to view the system partition situation.
Under LINUX all devices are considered to be files, / dev directory for all file system devices, and a partition is a file name is the name of the partition.
1, to mount the disk partition (or storage device) through the mount Mount a file
mount mount the file [-t file system] [-o options] device directory
-t With this parameter, we have to specify the type of file system, the general sometimes without having designated recognizes
-o this option, the main options are permissions, users, disk quotas, language coding
device refers to a storage device, such as / dev / hda1, / dev / sda1, cdrom etc ... As for your in which the storage device system, mainly through view fdisk -l or / etc / fstab or the dmesg; normal circumstances drive device is / dev / cdrom; floppy disk device is / dev / fd0; hard disks and removable hard disk in the fdisk -l output prevail;
1) mounted on the drive and floppy drive;
we first create a directory and then execute Linux mount command to mount the file, so cdrom hung in / mnt / cdrom in the; we can at / mnt / cdrom in View disc information and documents; how this directory you want to build on how to build. What directory is not the most important. It is important that you know what you're doing on the line. For example, we can put this directory built dvdrom; then mount the file / dev / cdrom / mnt / dvdrom with Linux mount to mount;
2) mount the hard disk and removable hard disk file system;
after only a partition to create a file system use, we said earlier, we are mostly used in the Linux ext2, ext3, reiserfs, fat32, msdos, ntfs etc.;
[1] Linux file system mount;
First we have to build a file system mounted directory; we have already mentioned; a partition file system to be linked to the system, there must be a mount point; this mount point is a directory; for example, we pass fdisk -l know hda5 is the Linux partitions, and create a file system, such as it is reiserfs file system;
steps:
first create a mount directory; for example, / mnt / hda5
set permissions / mnt / hda5 for any user can write readable executable; so that all users can write in;
by specifying -t reiserfs / dev / hda5 is reiserfs file system and mount / mnt / hda5 directory;
if we do not know the hda5 reiserfs file system, we can with -t auto let the system decide, then mount / mnt / hda5  
without any parameters, direct Linux mount to mount file / dev / hda5 to / mnt / hda5; the system automatically determine the partition file system;
-LH be viewed by df is not mounted as well;
if you do not use the mount umount / mnt / hda5 unmount
----------------
Disclaimer: This article is CSDN bloggers' potential Q line "in the original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/margin_0px/article/details/81740225

Guess you like

Origin www.cnblogs.com/rong2019/p/12005730.html