"Linux learning is not difficult" file system Management (8): Set boot automatically mount Linux file system

Source: Internet
Author: User
Tags uuid

18.8 the Linux learning is not difficult. File System Management ( 8 ): Set boot auto Mount Linux File System

You can only use a partition or a device after it is mounted, but when the computer restarts, it needs to be mounted again, and this time it is possible to automatically mount the Linux file system by modifying the/etc/fstab file for boot. To automatically mount the file system on boot, you need to add information about the disk partition in the/etc/fstab file, which can be implemented by providing the device name and UUID.

1 . Use device name

Edit the/etc/fstab file to add the following to the end of the file.

/dev/sda5/mnt/www XFS Defaults 1 2

2 . Using UUID

First use the following command to first view the UUID information for the disk partition/dev/sda5.

[Email protected] ~]# ls-l/dev/disk/by-uuid

Total dosage 0

lrwxrwxrwx. 1 root root month 14:56 500f998a-a4c9-43d8-b468-109a42787ec8. /.. /sda2

lrwxrwxrwx. 1 root root month 14:56 b6d87c93-6c54-48f3-9295-ec0f7b92c9f3. /.. /SDA1

lrwxrwxrwx. 1 root root Month 14:56 D8636446-9878-4437-b43c-50d71af8beba. /.. /sda3

lrwxrwxrwx. 1 root root Month 15:02 F084B8A6-C9AB-425B-99DA-B64CB35E4FC2. /.. /sda5

// Disk Partitioning /dev/sda5 of the UUID is a F084B8A6-C9AB-425B-99DA-B64CB35E4FC2

then edit /etc/fstab file , Add the following at the end of the file.

uuid= f084b8a6-c9ab-425b-99da-b64cb35e4fc2/mnt/www XFS Defaults 1 2

This article extracts from "Linux Learning is not difficult" textbook, which is one of the most practical, theoretical and practical Linux Introductory materials. To read the entire book, visit the Linux ops (www.linuxywz.com) website .

"Linux learning is not difficult" file system Management (8): Set boot automatically mount Linux file system

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.