↑↓ move Enter open Esc close

Cheat sheet · 9 commands

Permissions & ownership

Read is 4, write is 2, execute is 1, and the three digits are owner, group and others. With that one rule, 755, 644 and 600 stop being magic numbers and become sentences you can read.

The 3 you will use every day

rwxr-xr-x: directories and executables

rw-r--r--: regular files

rw-------: private keys and secrets

The full sheet

  • Make a file executableguide ›
  • rwxr-xr-x: directories and executablesguide ›
  • rw-r--r--: regular filesguide ›
  • rw-------: private keys and secretsguide ›
  • Correct recursive fix for directoriesguide ›
  • Correct recursive fix for filesguide ›
  • Change owner and group of a treeguide ›
  • Copy ownership from another fileguide ›
  • Show which permission bits are removed from new files
Practise these for real in the interactive course, or keep every sheet, chapter and fix in one book: The Linux Command Line Handbook.