Change Permissions in Shell

Level 238 keystrokes

chmod changes file permissions using numeric or symbolic modes.

Shell code

# Each digit is read 4 + write 2 + execute 1, for owner, group, others
# 755 = rwxr-xr-x: the owner can do everything, others can read and execute
1chmod 755 script.sh
# +x adds execute permission without touching the other bits
2chmod +x deploy.sh
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this Shell code and how often they appear.

  • .× 2
  • +× 1

More Shell examples at level 2

← Shell typing practice