In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about how to use the Linux mount command, many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.
The Linux mount command is a frequently used command that is used to mount files off the Linux system.
Grammar
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.
Example
Hang / dev/hda1 under / mnt.
# mount / dev/hda1 / mnt
Hang / dev/hda1 under / mnt in read-only mode.
# mount-o ro / dev/hda1 / mnt
Hang the image file of the CD / 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
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.
After reading the above, do you have any further understanding of how to use the Linux mount command? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.