How to configure disk quotas in Linux

Source: Internet
Author: User

Nowadays, many people are learning about Linux, which is more and more popular with computer users. As a result, many users may encounter Linux Disk Quota configuration when learning Linux, here we will introduce the solution to the Linux disk quota, and share it with you here.

1. Check whether the quota package is installed.
# Rpm-q quota

2. modify the configuration file "fstab" and add "usrquota" and "kgquota" to the partition to be configured in the settings"
# Vi/etc/fstab
LABEL = // ext3 defaults, usrquota, MAID 1

3. Re-mount the File System
After correctly configuring the "fstab" file, you need to re-mount it to the file system. This is the configuration of the file system that takes effect. The simplest way to set the root partition is to restart the system.
# Reboot

4. After the system is restarted, create a quota file for users and groups:
# Quotacheck-cmug/
The quota file is automatically created in the root directory of the partition file system.

5. You can create a user: aaa
Set a quota for this user

6. set a quota for user aaa. In actual applications, only the size of the user's most disk is used. You do not need to set the number of files. The hard limit should be greater than the soft limit, to help verify the user's usage of the quota, set only the number of files for the user:
Edquota-u aaa
You can use the edquota-g group name if you have set the group name.

7. Check the consistency of the quota system. This step can be omitted)
# Quotacheck-mfvug/

8. Launch quota items:
Quotaon-avug

9. The quota step is basically complete. Use quota-u aaa to check the user's aaa quota.

I hope you can learn how to configure disk quotas in Linux.

  1. Detailed introduction to the use of Linux scp
  2. Describe the concept of Linux Makefile
  3. Select your preferred Linux system Desktop
  4. Windows is worth the top ten features of Linux
  5. Use Linux to prevent hackers

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.