Linux Comm Umask
# Linux umask Command
[ Linux Command Manual](#)
The Linux umask command specifies the default permission mask when creating files.
umask can be used to set the . The consists of three octal digits. By subtracting the permission mask from the existing access permissions, the default permissions for creating files are generated.
### Syntax
umask
**Parameter Description**:
-S Represents the permission mask in a textual format.
### Example
To view the current permission mask using the "umask" command, enter the following command:
$ umask #Get the current permission mask
After executing the above command, the output information is as follows:
0022
Next, use the "mkdir" command to create a directory and use the "ls" command to get detailed information about that directory. Enter the following command:
$ mkdir test1 #Create directory $ ls βd βl test1/ #Display detailed information about the directory
After executing the above command, the detailed information of the newly created directory will be displayed as follows:
drwxr-xr-x 2 rootlocal rootlocal 4096 2011-9-19 21:46 test1/
Note: In the output above, "drwxr-xr-x" = "777-022=755".
[ Linux Command Manual](#)
YouTip