Use disk quota in ubuntu multi-user

This article is automatically synchronized by Tencent Cloud + Community, the original address is https://stackoverflow.club/article/use_quota_in_ubuntu/

purpose#

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.

Technical Route#

Use quota this software to manage disk quotas.

Setup process#

installation##

sudo apt install quota

Set Mounting Mode##

sudo vim /etc/fstab

Add options on the disk that expects to set quota

cat /etc/fstab

Remount

sudo mount -a

scanning##

sudo quotacheck -avug

These two files will appear after scanning.

Turning on and off the quota service##

Turn on: sudo quotaon -vug /

Close: sudo quotaoff -vug /

Set quota##

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 quota##

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

reference#

Configure quota for U disk

Recommended Posts

Use disk quota in ubuntu multi-user
Use supervisor in ubuntu
Use of Anaconda in Ubuntu
How to use hanlp in ubuntu
Ubuntu use notes
ubuntu zip/unzip use
How to configure TensorFlow use environment in Ubuntu
How to use dpkg command in Ubuntu system
Use Ubuntu and windows system in virtual machine
Introduction to the use of Hanlp in ubuntu
Mount the disk in a directory under Ubuntu 18.04
Installation and use of SSH in Ubuntu environment
Nagios3 in ubuntu serve
Installation and use of GDAL in Python under Ubuntu
Use iptables under ubuntu
How to use Putty to log in to ubuntu installed in VirtualBox
Install python in Ubuntu
Install JDK in Ubuntu19.10
ubuntu 14.04 16.04 18.04 use Alibaba source
How to map shared disk to window in linux under Ubuntu
Install VMware Tools in Ubuntu 18.04
Use sublime tex under ubuntu
Use of mediawiki under ubuntu
Use virtualbox to deploy ubuntu
Core dump debugging in ubuntu
Detailed explanation of the installation and use of SSH in the Ubuntu environment