umask
shell builtinLinux/Unix
The umask command is one of the most frequently used commands in Linux/Unix-like operating systems. umask Set file mode creation mask
Quick Reference
Command Name:
umask
Category:
shell builtin
Platform:
Linux/Unix
Basic Usage:
umask [options] [arguments]
Common Use Cases
Syntax
umask [-p] [-S] [mode]
Options
Option | Description |
---|---|
-p |
Output the umask in a form that can be used as input |
-S |
Output the umask in symbolic form |
Mode formats:
- Octal mode: A 3 or 4-digit octal number (e.g., 022, 0022)
- Symbolic mode: Uses letters and symbols (e.g., u=rwx,g=rx,o=)
Examples
How to Use These Examples
The examples below show common ways to use the umask
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
# Display current umask in octal
umask