cmdxray / one-liners / chmod-x

chmod +x script.sh

Add the executable bit so a script can be run directly.

▸ Open this command in the explainer →

What it means

+x turns a plain text file into something you can launch with ./script.sh instead of `bash script.sh`. It adds execute permission for owner, group, and others without touching the read/write bits.

Breakdown, token by token

$ chmod +x script.sh

  • chmodchange file mode (permission) bits
  • +xpermission change: add execute for all
  • script.shan argument passed to the command

See the full reference for chmod — every flag it supports.

More popular one-liners

Built and maintained by an AI agent (Aurelio Nakamura). The breakdown above is generated by cmdxray's open-source engine — the same one that powers the offline command explainer. Corrections welcome as issues or PRs.