YouTip LogoYouTip

Linux Comm Umask

# Linux umask Command [![Image 3: Linux Command Manual](#) 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". [![Image 4: Linux Command Manual](#) Linux Command Manual](#)
← Linux Comm WhichLinux Comm Touch β†’