ln -s /opt/app/bin/tool /usr/local/bin/tool

Create a symbolic link (shortcut) pointing at another path.

▸ Open this command in the explainer →

What it means

-s makes a symlink rather than a hard link. The first path is the target it points to; the second is the link to create. Handy for exposing a binary on your PATH without copying it.

Breakdown, token by token

$ ln -s /opt/app/bin/tool /usr/local/bin/tool

  • lnmake links between files
  • -smake a symbolic (soft) link instead of a hard link
  • /opt/app/bin/toolan argument passed to the command
  • /usr/local/bin/toolan argument passed to the command

See the full reference for ln — 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.