• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

quotaon command examples in Linux

by admin

The quotaon command is used to turn quotas on for a filesystem. Normally when the system is booted, it will turn on quotas automatically. However, you may turn off quotas by executing the quotaoff command followed by the name of the filesystem (the following commands must be executed by the root user):

[root@localhost ~]$ quotaoff /dev/sdb1
[root@localhost ~]$ quotaon /dev/sdb1

Quotaon command options are:

Options Function
-a, –all Turn on quotas for all autoloading filesystems in /etc/fstab that support them.
-f, –off Invoke quotaoff instead of quotaon.
-F format, –format=format Check quota files for the specified format.
-g, –group Turn group quotas on.
-p, –print-state Print current quota status, then exit.
-u, –user Turn user quotas on.
-v, –verbose Print a message for each filesystem affected by the command.

How to Manually Configure quota on a Filesystem

Manual configuration of quotas involves changing entries in your system’s file system table, /etc/fstab, to add the usrquota mount option to the desired portion of your file system. As an example in a simple file system, you can enable quota management like this:

LABEL=/    /     ext4    defaults,usrquota        1 1

Examples of using quotaon command

1. To turn the quota on:

# quotaon

2. To turn the quota on for a file system:

# quotaon -a
# quotaon --all

3. To turn the quota on for a user:

# quotaon -u mike
# quotaon --user mike

4. To turn the quota on for a group:

# quotaon -g SUPPORT 
# quotaon --group SUPPORT

5. To print the quota state:

# quotaon -p
# quotaon --print-state

6. To run in verbose mode:

# quotaon -v
# quotaon --verbose

Filed Under: Linux

Some more articles you might also be interested in …

  1. test: command not found
  2. Kernel Logs Warning Messages “kernel: Possible SYN flooding on port X. Sending cookies” is logged”
  3. powerstat: command not found
  4. touch Command Examples in Linux
  5. fprintd-delete: command not found
  6. fswebcam: Small and simple webcam for *nix
  7. btrfs rescue Command Examples in Linux
  8. CentOS / RHEL : How to exclude kernel or other packages from getting updated using YUM Versionlock Plugin
  9. How to Remove/ Disable Bash shell Command History on Linux
  10. How to Manage Virtual Machines from the CentOS/RHEL 8 Web Console-Cockpit

You May Also Like

Primary Sidebar

Recent Posts

  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples
  • “glab mr” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright