Linux and Unix umask command

Quick links

About umask
Syntax
Examples
Related commands
Linux and Unix main page

About umask

Get or set the file mode creation mask.

Syntax

umask [-S] [000] [mask]

-SProduce symbolic output.

The default output style is unspecified, but will be recognized on a subsequent invocation of umask on the same system as a mask operand to restore the previous file mode creation mask.

000Any three octal digits used for permissions.

Examples

umask

Running umask alone will display the current umask environment settings.

umask 000

The above example allows any permissions. This does not actually set permissions just allows permissions to be set.

Related commands

chmod
csh
ksh
sh