In a large multi-user system, you usually need to control the hard disk size that each user can use. To manage the hard disk quota, you must install the quota and quotatool packages. Disk Quota Management in Ubuntu is disabled by default and can be enabled and configured by the system administrator. The system administrator can use a series of commands related to the hard disk quota: quotacheck to initialize the quota database file; edquota to set and edit the user quota; setquota to configure the hard disk quota; quotaon and quotao
In a large multi-user system, you usually need to control the hard disk size that each user can use.
To manage the hard disk quota, you must install the quota and quotatool packages. Disk Quota Management in Ubuntu is disabled by default and can be enabled and configured by the system administrator. The system administrator can use a series of commands related to the hard disk quota: quotacheck to initialize the quota database file; edquota to set and edit the user quota; set quota to configure the hard disk quota; quotaon and quotaoff to control the quota service; warnquota automatically sends emails to users who exceed the hard disk quota.
Quotas is not enabled even if the quota package is installed. After the quota service is enabled, you can view the/etc/fstb file and define the hard disk quota information in the 4th fields of each row. For example:
/Dev/hda5/home/ext3 defaults, usrquota, kgquota 1 1
The/home partition starts the quota service. Two files, quota. user and quota. group, can be found in the root directory where the quota service is enabled. The file contains the specific quota information. The permission for these two files is 600, that is, the user cannot write all files; otherwise, the user may allocate a larger quota for himself.
To initialize the hard disk quota, the partition must be remounted. Run the following command:
Sudo mount-o ro, remount partition_to_be_remounted mount_point
Common Hard Disk Quota Commands include:
Quotaon, quotaoff -- start or close the quota service for a partition
Repquota-Status report on Hard Disk Quota of users and groups
Quotacheck -- Update the quota status (run after fsck to compare the usage of the New and Old hard disks)
Edquota-basic quota management command
You can enable or disable the hard disk quota service by changing the entries in the/etc/fstab file. Add the usrquota or kgquota option to the 4th fields.
You can also create the quota. user and quota. group files in the root directory of the partition, and then use the quotaon command to start the hard disk quota service.
Sudo touch/quota. user (create the quota. user File)
Sudo quotaon-av (enable Hard Disk Quota Service)
Quota-v (users can query their hard disk quota)