This tutorial explains Linux “quotaon” command, options and its usage with examples.
Description :
quotaon announces to the system that disk quotas should be enabled on one or more filesystems. The filesystem quota files must be present in the root directory of the specified filesystem and be named either aquota.user (for version 2 user quota), quota.user (for version 1 user quota), aquota.group (for version 2 group quota), or quota.group (for version 1 group quota) and /etc/fstab for default filesystems.
An error (EPERM) will be returned if the quota.user and quota.group files are not owned by user root and group system. Ownership changes on these files are not permitted while quotas are active.
Usage :
quotaon [ -g ] [ -u ] [ -v ] { -a | FileSystem … }
Options :
-a
Enables or disables all file systems that are read-write and have disk quotas, as indicated by the /etc/filesystems file. When used with the -g flag, only group quotas in the /etc/filesystems file are enabled or disabled; when used with the -u flag, only user quotas in the /etc/filesystems file are enabled or disabled.
-g
Specifies that only group quotas are enabled or disabled.
-u
Specifies that only user quotas are enabled or disabled.
-v
Prints a message for each file system in which quotas are turned on or off.
Note :
By default, both user and group quotas are enabled. The -u flag enables only user quotas; the -g flag enables only group quotas. Specifying both -g and -u flags is equivalent to the default (no option specified).
Examples :
1. To enable user quotas for the /usr file system, enter:
# quotaon -u /usr
2. To enable user and group quotas and also print message for the same
# quotaon -vug /dev/sdb1 /dev/sdb1 [/home]: group quotas turned on /dev/sdb1 [/home]: user quotas turned on
3. To enable user and group quotas for all file systems in the /etc/filesystems file
# quotaon -a
Sanfoundry Global Education & Learning Series – 1000 Linux Tutorials.
- Practice Programming MCQs
- Apply for Programming Internship
- Check Linux Books
- Check Information Technology Books