LinuxCommandLibrary

quotaon

TLDR

Enable quotas on filesystem

$ sudo quotaon [/home]
copy
Enable all quotas
$ sudo quotaon -a
copy
Enable user quotas only
$ sudo quotaon -u [/home]
copy
Enable group quotas only
$ sudo quotaon -g [/home]
copy
Verbose output
$ sudo quotaon -v [/home]
copy

SYNOPSIS

quotaon [options] [filesystem...]

DESCRIPTION

quotaon enables disk quota enforcement on filesystems. Quotas must first be configured in /etc/fstab and quota files created with quotacheck.

PARAMETERS

-a

Enable all filesystems in /etc/fstab.
-u
Enable user quotas.
-g
Enable group quotas.
-v
Verbose mode.
-p
Print status only.
-f
Force enable.

EXAMPLES

$ # Enable all configured quotas
sudo quotaon -a

# Enable on specific filesystem
sudo quotaon /home

# Enable user quotas only
sudo quotaon -u /home

# Check what would be enabled
sudo quotaon -p /home

# Enable with verbose output
sudo quotaon -vug /home
copy

SETUP WORKFLOW

$ # 1. Edit /etc/fstab (add usrquota,grpquota)
# 2. Remount filesystem
mount -o remount /home

# 3. Create quota files
quotacheck -cug /home

# 4. Enable quotas
quotaon /home

# 5. Set user limits
edquota -u username
copy

CAVEATS

Requires quota support in kernel and filesystem. Must run quotacheck first. Requires root privileges.

HISTORY

Disk quotas originated in BSD Unix and were adopted by Linux for managing disk space allocation.

SEE ALSO

Copied to clipboard