IT lexicon › Infra & Ops › Variant symlinks (DragonFly)

Variant symlinks (DragonFly)

Infra & Ops På svenska → Updated: 2026-11-09

Symbolic links in DragonFly BSD whose targets contain variables, so the same link leads somewhere different depending on who follows it.

An ordinary symlink is a fixed string. In DragonFly that string may contain ${NAME}, and the kernel substitutes the variable during path lookup. Values are set with the varsym utility and can be scoped per process, per user or system-wide; the feature is switched on with the vfs.varsym_enable sysctl.

Matthew Dillon added them early in the DragonFly project, but the idea is older: Apollo's Domain/OS had variant links in the 1980s so that one path could lead to the right binaries on different machine types. The use cases have barely changed, and neither has the side effect — a filesystem that is harder to reason about for anyone who doesn't know the trick.

← Back to the lexicon