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

How to use the Linux mount command

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

Share

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

Today, I would like to share with you the relevant knowledge of how to use the Linux mount command. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

Linux common command mount command is a frequently used command, which is used to mount files outside the Linux system.

Syntax mount [- hV] mount-a [- fFnrsvw] [- t vfstype] mount [- fnrsvw] [- o options [,...]] Device | dir mount [- fnrsvw] [- t vfstype] [- o options] device dir parameter description:

-V: displays the version of the program

-h: display auxiliary messages

-v: displays more messages, usually used with-f for debugging.

-a: mount all file systems defined in / etc/fstab.

-F: this command, usually used with-a, generates a stroke for each mount action to be executed. When the system needs to hang a large number of NFS file system, you can speed up the action of hanging.

-f: usually used for debugging purposes. It causes mount not to perform the actual mount action, but to simulate the entire mount process. Usually used with-v.

-n: generally speaking, mount will write a piece of data in / etc/mtab after hanging up. However, you can use this option to cancel this action if there is no writable file system in the system.

-smurr: equal to-o ro

-w: equal to-o rw

-L: attach the hard drive with a specific label.

-U: hang up the file system with the file division serial number. -L and-U only make sense when files such as / proc/partition exist.

-t: specifies the type of file system, usually not required. Mount automatically selects the correct type.

-o async: turn on asynchronous mode, and all file read and write actions will be performed in asynchronous mode.

-o sync: executes in synchronous mode.

-oatime,-o noatime: when atime is opened, the last call time of the archive is updated each time the archive is read. When we use the flash file system, we may choose to turn this option off to reduce the number of writes.

-oauto,-o noauto: toggles auto hang mode on / off.

-o defaults: use the default options rw, suid, dev, exec, auto, nouser, and async.

-odev,-o nodev-o exec,-o noexec allow executable files to be executed.

-osuid,-o nosuid:

Allows the execution file to be executed under root authority.

-ouser,-o nouser: users can perform mount/umount actions.

-o remount: re-mount a suspended file system in a different way. For example, a system that used to be read-only is now re-hung in read-write mode.

-o ro: hang up in read-only mode.

-o rw: hang it in read / write mode.

-o loop=: uses loop mode to attach a file to the system as if it were a hard disk partition.

Instance hangs / dev/hda1 under / mnt.

# mount / dev/hda1 / mnt hangs / dev/hda1 under / mnt in read-only mode.

# mount-o ro / dev/hda1 / mnt hangs the image file of / tmp/image.iso under / mnt/cdrom using loop mode. In this way, the contents of Linux ISO files that can be found on the network can be viewed without burning them into CDs.

# mount-o loop / tmp/image.iso / mnt/cdrom above is all the content of the article "how to use Linux mount commands". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

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