Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the knowledge points of Linux mount

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

What are the knowledge points mounted on Linux? in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

In the Linux system, we can use some external devices by mounting. In this case, we need to master the following knowledge points:

1. Hardware and device files

Most of the hardware devices in the Linux system exist in the form of files, so different hardware devices represent different file types, and the corresponding files in the hardware and system are usually called device files. Device files provide an interface between the external device and the operating system, and users are equivalent to using ordinary files when using external devices.

The device files are stored in the / dev directory under the Linux system (almost all the hardware device files are in the / dev directory). The device files are named by the primary device number plus the secondary device number, which is used to distinguish different types of devices, while the secondary device number is used to distinguish multiple devices of the same type.

The file name correspondence between the device and the device in Linux is shown in Table 1.

Table 1

Set the file name of the device in Linux: IDE hard disk / dev/hd [Amurd] SCSI/SATA/U disk hard disk / dev/sd [Amurp] U disk / dev/sd [Amurp] floppy disk / dev/fd [0-1] 35-pin printer / dev/lp [0-3] USB printer / dev/usb/lp [0-15] PS3 mouse / dev/psauxUSB mouse / dev/usb/mouse [0-15] current CD ROM/DVD ROM/ Dev/cdrom current mouse / dev/mouseIDE tape drive / dev/ht0SICI disk drive / dev/st0

2. Common file system types

The file system type is the format of the partition, and Linux provides different file types for different external devices, as shown in Table 2.

Table 2 File system types

Various remarks on the file system

Msdos DOS file system type

Vfat supports DOS partition file system types with long file names, which are understood as Windows file system types

Iso9660 CD format file system type

Mainstream file system types under ext 3/ext 3/ext 4 Linux

A high-performance journaling file system under xfs Linux, which becomes the default file system in CentOS 7 version

3. Installation of equipment

Mounting is a process in which the operating system makes computer files and directories on a storage device (such as hard disk, CDROM, etc.) accessible to users through the computer's file system.

In Linux system, the mount command is mount, and the mount format is as follows:

[root@liangxu ~] # mount-t file system type device name mount point

There is a / mnt directory (temporary mount point directory) in the Linux system, which system administrators can use to manually mount some media devices. At the same time, the Linux system also has a / media directory (automatically mounted directory), which is mainly used to automatically mount CD, U disk and other mobile devices.

Currently in the CentOS7 version, there is a / run auto-mount directory to which all mobile devices are automatically mounted.

There are three types of devices generally mounted:

Mount the floppy disk as follows:

[root@liangxu] # mount-t msdos/dev/fdo/mnt/floppy

When mounting a U disk, you need to determine the device name of the U disk first, and you can use the dmesg | more command to view it. Generally, the device file is / dev/sda1, and then the mount point mkdir/mnt/usb is established before mounting. The code is as follows:

[root@liangxu] # mount-t vfat/dev/sda1/mnt/usb

There are two ways to mount a CD. The first code is as follows:

[root@liangxu] # mount-t iso9660/dev/hda/mnt/cdrom

The second code is as follows:

[root@liangxu ~] # mount/dev/cdrom/mnt/cdrom

Note: when you need to use another CD, you must unmount the previously mounted CD, and then remount the new CD.

4. Uninstall the equipment

The command format for uninstalling the device is as follows:

[root@liangxu ~] # umount mount directory

For example:

Uninstall the USB disk as follows:

[root@liangxu ~] # umount / mnt/usb

2) Uninstall the CD with the following code:

[root@liangxu ~] # umount / mnt/cdrom

Note: the "eject key" on the CD drive does not play the role it should have until the CD is uninstalled.

What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.

The answers to the questions about Linux mounting are shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report