The edquota command in Linux is used to edit user or group disk quotas. This tool allows administrators to set and modify quotas, ensuring that users and groups stay within specified disk space limits. If a number is provided in place of a user or group name, it is treated as a UID or GID. The command generates a temporary file with the current disk quota information in ASCII format for editing. After modifications, the updated quotas are applied.
Only superusers (via sudo) are permitted to edit quotas, and users may exceed soft limits for a specified grace period. Once the grace period expires, the soft limit becomes a hard limit.
Syntax
edquota [-rm] [-u] [-F formatname] [-p username] [-f filesystem] username ...
edquota [-rm] -g [-F formatname] [-p groupname] [-f filesystem] groupname ...
edquota [-rm] -P [-F formatname] [-p projectname] [-f filesystem] projectname ...
edquota [-u|g|-P] [-F formatname] [-f filesystem] -t
edquota [-u|g|-P] [-F formatname] [-f filesystem] -T username|groupname|projectname ...Key Options for edquota Command
Option | Description |
|---|---|
-u | Edit the user quota (default). |
-g | Edit the group quota. |
-r | Edit remote quota via RPC. |
-p | Copy data from a prototype user/group. |
-F | Specify quota format (e.g., vfsv0, xfs). |
-f | Perform operations only for the specified file system. |
-t | Edit soft time limits for each file system. |
-T | Modify time limits for a specific user, group, or project. |
Working with edquota Command in Linux
1. Edit the user quota. This is the default.
edquota -u username
This command will open the quota settings for the specified user in an editor, allowing to make modifications.
2. Edit the group quota.
edquota -g groupname
3. Edit the remote quota (via RPC).
edquota [-u|-g] -r username | groupname
4. Copy data from a prototype user/group.
If --always-resolve is used, then always try to resolve the name, even if it is composed only of digits.
edquota [-u|-g] -p prototype_name username | groupname 
5. Edit quota for specified format
(Donât perform format auto detection). Possible format names are: vfsold, vfsv0, rpc , xfs.
edquota [-u|-g] -F vfsv0 username | groupname

6. Perform specified operations only for the given file system.
edquota [-u|-g] -f filesystem username | groupname
7. Edit the soft time limits for each file system.
Time units of âsecondsâ, âminutesâ, âhoursâ, and âdaysâ are understood.
edquota [-u|-g] -t 12 username | groupnameConclusion
The edquota command provides administrators with flexibility to manage and enforce disk usage limits for users and groups. By using options to modify quotas, time limits, or apply quotas to specific file systems, edquota helps prevent overuse of disk space resources.