Permissions and owners
The umask command
Defines which permissions are REMOVED from new files you create.
Syntax
umask [valor]Most useful options
022The usual: the others only read077Only you: fully privateCopy-ready examples
$ umask 077Make it private$ umask 022Back to usualYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- It does not change what already exists: only what you create from now on.
FAQ
Why is my new file rw-------?
Because your umask removes permissions from the group and others.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course