Definition:

  • Set the shell process’s file creation mask to mode.
    • instead of specifying which permission to set, it specify which permission to mask or clear from default
  • If mode begins with a digit, it is interpreted as an octal number;
    • if not, it is interpreted as a symbolic mode mask similar to that accepted by the chmod command.
    • If mode is omitted, the current value of the mask is printed.
  • Note that when the mode is interpreted as an octal number, each number of the umask is subtracted from 7. Thus, a umask of 022 (no write for group and others) results in permissions of 755.

Synopsis:

  • umask [-p] [-S] [mode]

List of options:

  • If the -S option is supplied without a mode argument, the mask is printed in a symbolic format.
  • If the -p option is supplied, and mode is omitted, the output is in a form that may be reused as input.