How to use the/etc/fstab configuration file

Source: Internet
Author: User
This file is very important to learn all the parameters in the/etc/fstab file. This file is the system of the configuration file system. all the created partitions must be written in this file. Otherwise, your partitions will not be mounted at the next startup. First, learn a mount? A. This command restarts reading/

About the/etc/fstab file

Learn all the parameters in the/etc/fstab file. This file is very important. This file is the system of the configuration file system. all the created partitions must be written in this file. Otherwise, your partitions will not be mounted at the next startup.

First, learn a mount? A command

This command will restart to read the/etc/fstab file. Can I use mount? Run command a to mount all the file systems in/etc/fstab. Make a small experiment to verify it.

First, unmount/dev/sda7.

[Root @ localhost ~] # Umount/dev/sda7

[Root @ localhost ~] # Df

Filesystem 1K-blocks Used Available Use % Mounted on

/Dev/sda3 4061572 2589456 1262468 68%/

/Dev/sda6 505604 10545 468955 3%/home

/Dev/sda2 4061572 1799208 2052716 47%/var

/Dev/sda1 101086 13588 82279 15%/boot

Tmpfs 192132 0 192132 0%/dev/shm

[Root @ localhost ~] #

The/dev/sda7 partition is successfully uninstalled.

Then add such a line manually in the/etc/fstab file.

/Dev/sda7/mnt ext3 defaults 0 0

~

Run the mount-a command.

[Root @ localhost ~] # Mount-

[Root @ localhost ~] # Df-h

Filesystem Size Used Avail Use % Mountedon

/Dev/sda3 3.9 GB 2.5G 1.3G 68%/

/Dev/sda6 494 M 11 M 458 M 3%/home

/Dev/sda2 3.9G 1.8G 2.0G 47%/var

/Dev/sda1 99 M 14 M 81 M 15%/boot

Tmpfs 188 M 0 188 M 0%/dev/shm

/Dev/sda7 471 M 18 M 405 M 5%/mnt

[Root @ localhost ~] #

/Dev/sda7 is re-mounted to/mnt.

 

 

 

The following is the meaning of each parameter in the/etc/fstab file.

Let's take a look at the meaning of each parameter in the/etc/fstab file.

LABEL = // ext3 defaults 11

LABEL =/home ext3 defaults 1 2

LABEL =/var ext3 defaults 12

LABEL =/boot ext3 defaults 12

Tmpfs/dev/shm tmpfs & nbs

...
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.