Bash and Linux 5 cheatsheet

Bash and Linux 5: Permissions

3 common Bash and Linux 5 tasks.

Make a file executable

Allow a script to be run directly.

chmod +x script.sh

Set permissions with numbers

Owner read/write, everyone else read-only.

chmod 644 file.txt

Change the owner

Change the owner and group of a folder and everything in it.

sudo chown -R user:group folder/

Was this page helpful?