Reference

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.
CommandWhat it doesExample
octal digitsAdd them: 4=read, 2=write, 1=execute.7 = rwx · 6 = rw- · 5 = r-x
chmod 755Owner rwx; group and others r-x.chmod 755 script.sh
chmod 644Owner rw-; group and others r--.chmod 644 notes.txt
chmod 600Owner rw- only - private file.chmod 600 ~/.ssh/id_ed25519
chmod +xMake a file executable.chmod +x deploy.sh
chmod -RApply recursively to a folder.chmod -R 755 public/
chmod g-wSymbolic: remove write for the group.chmod g-w shared.txt
chmod o-rSymbolic: remove read for others.chmod o-r secret.txt
reading ls -lThe 10-char column shows the bits.-rwxr-xr-- = 754
chownChange a file’s owner and group.chown ana:devs file.txt
chown -RChange ownership recursively.chown -R www-data:www-data /var/www
umaskDefault permissions for new files.umask 022