20.9.2 Assigning Disk Quotas to Users and Groups

To configure the disk quota for a user:

  1. Enter the following command for a user:

    # edquota username

    or for a group:

    # edquota -g group

    The command opens a text file opens in the default editor defined by the EDITOR environment variable, allowing you to specify the limits for the user or group, for example:

    Disk quotas for user guest (uid 501)
    Filesystem  blocks  soft  hard  inodes  soft  hard
     /dev/sdb1   10325     0     0    1054     0     0

    The blocks and inodes entries show the user's currently usage on a file system.

    Tip

    Setting a limit to 0 disables quota checking and enforcement for the corresponding blocks or inodes category.

  2. Edit the soft and hard block limits for number of blocks and inodes, and save and close the file.

Alternatively, you can use the setquota command to configure quota limits from the command-line. The -p option allows you to apply quota settings from one user or group to another user or group.

For more information, see the edquota(8) and setquota(8) manual pages.