This article is automatically synchronized by Tencent Cloud + Community, the original address is https://stackoverflow.club/article/use_quota_in_ubuntu/
For multi-user ubuntu hosts, disk quotas must be set, otherwise it will be abused, causing the home directory to be full and having to change disks or expand the size.
Use quota
this software to manage disk quotas.
sudo apt install quota
sudo vim /etc/fstab
Add options on the disk that expects to set quota
cat /etc/fstab
Remount
sudo mount -a
sudo quotacheck -avug
These two files will appear after scanning.
Turn on: sudo quotaon -vug /
Close: sudo quotaoff -vug /
Set quotas for users
sudo edquota -u quotauser1
Set quotas for user groups
sudo edquota -g quotagroup
Copy quota
sudo edquota -p myquota1 myquota2
View copied quota
sudo quota -v myquota2
View by user
quota
Administrator view users and groups
sudo quota -uvs quotauser1 quotauser2
sudo quota -gvs quotagroup
Manage and view user and group reports
sudo repquota -auvs
sudo repquota -agvs
Recommended Posts