LinuxCommandLibrary

edquota

Edit user or group disk quotas

TLDR

Edit quota of the current user

$ edquota [[-u|--user]] $(whoami)
copy

Edit quota of a specific user
$ sudo edquota [[-u|--user]] [username]
copy

Edit quota for a group
$ sudo edquota [[-g|--group]] [group]
copy

Restrict operations to a given filesystem (by default edquota operates on all filesystems with quotas)
$ sudo edquota [[-f|--file-system]] [filesystem]
copy

Edit the default grace period
$ sudo edquota [[-t|--edit-period]]
copy

Duplicate a quota to other users
$ sudo edquota [[-p|--prototype]] [reference_user] [destination_user1 destination_user2 ...]
copy

SYNOPSIS

edquota [-F, --format=fstype] [-g, --group] [-G, --globalquota] [-p, --prototype=proto] [-r, --replica] [-t, --editgrace] [-u, --user] [-v, --verbose] [username|groupname...]

PARAMETERS

-F, --format=fstype
    specify quota format (e.g., vfsv0, vfsv1, xfs)

-g, --group
    edit group quotas instead of user quotas

-G, --globalquota
    edit global/project quotas (XFS-specific)

-p, --prototype=proto
    copy quotas from prototype user/group to others

-r, --replica
    edit replica quotas

-t, --editgrace
    edit filesystem grace times

-u, --user
    edit user quotas (default)

-v, --verbose
    display more details on actions

DESCRIPTION

edquota is a command-line utility for system administrators to interactively edit disk quotas for users or groups on Linux filesystems with quota support.

It operates by reading the current quota information from the kernel and quota files, formatting it into a human-readable editor file (typically using vi or the editor set by EDITOR or VISUAL), and updating the quotas upon save and exit.

Primarily used as root, it supports user quotas (default), group quotas, grace times, and various quota formats. Changes apply immediately if quotas are active. It requires quotas to be enabled via mount options like usrquota or grpquota, and the quota filesystem to be consistent (use quotacheck beforehand).

The editor file shows fields like blocks used/hard/soft limits and inodes used/hard/soft limits per filesystem, making precise adjustments straightforward.

CAVEATS

Requires root privileges.
Must run on filesystems with quotas enabled and active.
Editor changes must save valid numeric limits; invalid input may fail silently.
Not for remote quotas without local quota files.

EDITOR FORMAT

Presents quotas as:
Disk quotas for user user (uid):
Filesystem blocks soft hard inodes soft hard
/dev/sda1 440 0 0 23 0 0

NO ARGUMENT USAGE

Without username, edits quota for current EUID (useful for non-root users if permitted).

HISTORY

Originated from BSD Unix disk quotas in the 1980s; integrated into Linux kernel ~2.4 (2001) with vfs quotas. Evolved in quota-tools package to support multiple formats (rpc, xfs) and project quotas.

SEE ALSO

quota(1), repquota(8), quotacheck(8), quotaon(8), setquota(8), quotaoff(8)

Copied to clipboard