The quotaon command is used to turn quotas on for a filesystem. Normally when the system is booted, it will turn on quotas automatically. However, you may turn off quotas by executing the quotaoff command followed by the name of the filesystem (the following commands must be executed by the root user):

[[email protected] ~]$ quotaoff /dev/sdb1
[[email protected] ~]$ quotaon /dev/sdb1

Quotaon command options are:

Options Function
-a, –all Turn on quotas for all autoloading filesystems in /etc/fstab that support them.
-f, –off Invoke quotaoff instead of quotaon.
-F format, –format=format Check quota files for the specified format.
-g, –group Turn group quotas on.
-p, –print-state Print current quota status, then exit.
-u, –user Turn user quotas on.
-v, –verbose Print a message for each filesystem affected by the command.

How to Manually Configure quota on a Filesystem

Manual configuration of quotas involves changing entries in your system’s file system table, /etc/fstab, to add the usrquota mount option to the desired portion of your file system. As an example in a simple file system, you can enable quota management like this:

LABEL=/    /     ext4    defaults,usrquota        1 1

Examples of using quotaon command

1. To turn the quota on:

2. To turn the quota on for a file system:

# quotaon -a
# quotaon --all

3. To turn the quota on for a user:

# quotaon -u mike
# quotaon --user mike

4. To turn the quota on for a group:

# quotaon -g SUPPORT 
# quotaon --group SUPPORT

5. To print the quota state:

# quotaon -p
# quotaon --print-state

6. To run in verbose mode:

# quotaon -v
# quotaon --verbose