Cheat Sheet
The commands you keep forgetting, with a one-line description and a real example you can copy - 384 across 26 tools. Pick a tool in the sidebar, or search across all of them.
chmod & Permissions
Read and set Unix file permissions, in octal and symbolic form.| Command | What it does | Example |
|---|---|---|
octal digits | Add them: 4=read, 2=write, 1=execute. | 7 = rwx · 6 = rw- · 5 = r-x |
chmod 755 | Owner rwx; group and others r-x. | chmod 755 script.sh |
chmod 644 | Owner rw-; group and others r--. | chmod 644 notes.txt |
chmod 600 | Owner rw- only - private file. | chmod 600 ~/.ssh/id_ed25519 |
chmod +x | Make a file executable. | chmod +x deploy.sh |
chmod -R | Apply recursively to a folder. | chmod -R 755 public/ |
chmod g-w | Symbolic: remove write for the group. | chmod g-w shared.txt |
chmod o-r | Symbolic: remove read for others. | chmod o-r secret.txt |
reading ls -l | The 10-char column shows the bits. | -rwxr-xr-- = 754 |
chown | Change a file’s owner and group. | chown ana:devs file.txt |
chown -R | Change ownership recursively. | chown -R www-data:www-data /var/www |
umask | Default permissions for new files. | umask 022 |