Home > Article > System Tutorial > Detailed explanation of the steps and methods to set Linux disk quota
In the following blog posts, we introduce the installation of the samba service and changing the configuration file to set up the samba service. But in Windows, you can manage the file server through the C drive quota. In Linux, you can also set the C drive quota to manage the file server. Linux data recovery is easier and simpler to configure.
Let’s briefly explain the basic steps of c drive quota so that the subsequent explanation will be easier to understand.
1. Check whether the software package is installed.
2. Edit file system files
3. Restart the computer
4. Generate c drive quota file
5. Set c drive quota for users or groups
6. Start c drive quota
There are quite a few stepsLinux user disk quota, but it can be seen that the actual operation is nothing more than 2.3 steps, so it is very convenient. Let's take a look at the specific steps to set Linux c disk quota.
1rpm-qa|grepquota (check whether the quota software package has been installed)
2.vi/etc/fstab (we change it in the first line here, indicating that we are doing c drive quota for the / directory)
3. Restart the computer. We changed the file system file, but it did not take effect after all. linux user disk quota, it will only take effect when the computer is restarted and the file system is reloaded. And an error will be reported during the restart process because there is no configuration file for the c drive quota. The restart command is: reboot
4. Since there is no configuration file for the C drive quota, we will use the quotacheck-cumg/ command to generate the C drive quota file. We first ls/ and cannot see the configuration file with c drive quota. After using the quotacheck-cumg command, we can see the following two configuration files.
5. Our planning work has already been completed. We are now starting to set c drive quotas for users or groups.
We will create a new user test here for testing.
useraddtest
Use this command to set the user's c drive quota: edquota-utest After pressing Enter, you will enter such a configuration file.
After editing the numbers, we will enter Part 6
6.quotaon-av starts the c drive quota.
In this way, the c drive quota is ready.
We can also view the user's c drive quota through quota+username.
But after the system default setting time on the Linux host, the system will manually clear the capacity included between the soft limit and the hard limit. We can set the soft limit time through edquota-t.
In this way, we can create our file server through the samba configuration file and c drive quota.
The above is the detailed content of Detailed explanation of the steps and methods to set Linux disk quota. For more information, please follow other related articles on the PHP Chinese website!