search

fstab(File System Table)

Feb 19, 2024 pm 06:30 PM
File systemmountfstab

fstab(File System Table)

fstab (File System Table) is a configuration file in the Linux system, used to define the rules for mounting file systems when the system starts.

The fstab file is located in the /etc directory and can be created manually or modified by an editor. Each line specifies a file system to be mounted.

Each row has six fields, their meanings are as follows:

The file system device file or UUID can be used to specify the device of the file system to be mounted. The UUID is a unique identifier and the UUID of the device can be obtained through the blkid command.

2. Mount point: Specify the directory to which the file system is to be mounted, which can be an absolute path (such as /mnt/data) or a relative path (such as ../data).

3. File system type: Specify the type of file system, such as ext4, ntfs, vfat, etc.

4. Mount options: When mounting the file system, you can specify some options, such as read and write permissions, automatic mounting, etc. Common options include allowing reading and writing, automatic mounting, etc.

– ro: Mount the file system in read-only mode.

– rw: Mount the file system in read-write mode.

– auto: Automatically mount the file system.

– noauto: Do ​​not automatically mount the file system.

– exec: Allow file execution.

– noexec: Disable execution of files.

For detailed options, please refer to the man man page (man fstab).

5. dump option: used for backup tools, such as dump command.

6. fsck option: used for file system checking tools, such as fsck command.

The following is an example fstab file content:

“`

/dev/sda1 /mnt/data ext4 rw 0 0

UUID=xxxxxxxx /mnt/backups ext4 ro 0 2

“`

The first line in this example indicates that the ext4 file system on the /dev/sda1 device is mounted to the /mnt/data directory and allows reading and writing. The second line indicates to mount the ext4 file system on the device with UUID xxxxxxxx to the /mnt/backups directory and only allow reading.

After modifying the fstab file, you can use the command mount -a to remount all file systems defined in the fstab file.

To summarize, by editing the fstab file, you can automatically mount the specified file system when the system starts and specify some mounting options. This is useful for systems that manage multiple file systems and can improve system stability and security.

The above is the detailed content of fstab(File System Table). For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:每日运维. If there is any infringement, please contact admin@php.cn delete
Zlib1.dll Is Missing or Not Found Error? Fix It with Simple Moves - MiniToolZlib1.dll Is Missing or Not Found Error? Fix It with Simple Moves - MiniToolApr 16, 2025 am 12:52 AM

What is zlib1.dll? Some people encountered the “zlib1.dll is missing” error or zlib1.dll not found error when they attempt to open an application that includes zlib1.dll. To fix these related errors, this article on php.cn Website can give you some i

AutoFill Is Not Working in Excel? Here Are Fixes! - MiniToolAutoFill Is Not Working in Excel? Here Are Fixes! - MiniToolApr 16, 2025 am 12:51 AM

Some of you might find that AutoFill is not working in Excel. Can you come up with any solutions on that? If not, then you have come to the right spot. This post on php.cn Website will provide you with 6 ways to solve Excel AutoFill not working.

Windows 7 Starter Edition: What Is It? How to Download It? - MiniToolWindows 7 Starter Edition: What Is It? How to Download It? - MiniToolApr 16, 2025 am 12:50 AM

What is Windows 7 Starter Edition? What are the limitations of Windows 7 Starter Edition? How to get the Windows 7 Starter Edition ISO? This post from php.cn provides detailed information about Windows 7 Starter Edition for you.

Run Apps as Different User in Windows with This Top GuideRun Apps as Different User in Windows with This Top GuideApr 16, 2025 am 12:49 AM

When running an App, are you troubled with changing accounts by logging out of the present one and then logging in to another? php.cn has collected some effective ways to help you run apps as a different user in Windows 10 and Windows 11.

Fixed: Dropbox There Was an Error Downloading Your FileFixed: Dropbox There Was an Error Downloading Your FileApr 16, 2025 am 12:48 AM

Are you suffering from the “Dropbox there was an error downloading your file” error in Windows? Now read this post given by php.cn to get several useful solutions to this problem.

5 Ways to Fix Selected Files Are Not Highlighted in File Explorer - MiniTool5 Ways to Fix Selected Files Are Not Highlighted in File Explorer - MiniToolApr 16, 2025 am 12:47 AM

Are you troubled by the problem of “selected files are not highlighted in File Explorer”? Do you know how to fix it? If not, you can read this post on php.cn to get several feasible solutions to make selected files visible in File Explorer.

Fix Language Bar Missing from the Taskbar - Proven GuideFix Language Bar Missing from the Taskbar - Proven GuideApr 16, 2025 am 12:46 AM

The language bar is essential if you work with multilanguage. You can change the input language by tweaking the setting from the taskbar. But the language bar might disappear one day when you open the computer. How to fix the language bar missing fro

How to Connect an External Drive to an Android Phone or Tablet? - MiniToolHow to Connect an External Drive to an Android Phone or Tablet? - MiniToolApr 16, 2025 am 12:45 AM

Want to use an external drive to expand your phone’s storage? It is possible to do this. This php.cn post shows you a guide on how to connect an external drive to a phone. Besides, if you need to recover data from your external drive, you can try php

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.