How to Make a Symbolic Link on Windows, macOS, and Linux

A symbolic link — often called a symlink — is one of those filesystem features that quietly powers a lot of how operating systems work under the hood. Once you understand what they are and how to create them, you'll find yourself reaching for them more often than you'd expect.

What Is a Symbolic Link?

A symbolic link is a special type of file that acts as a pointer to another file or folder somewhere else on your system. When you open a symlink, your operating system transparently redirects you to the target — the actual file or directory it points to.

Think of it like a shortcut on your desktop, but far more powerful. A symlink works at the filesystem level, which means applications, scripts, and the OS itself treat it as if it were the real file or folder.

Two types of links exist on most systems:

  • Symbolic links (symlinks): Point to a path. If the target moves or is deleted, the link breaks.
  • Hard links: Point directly to the underlying data on disk. More rigid, but more resilient to target renaming.

For most everyday use cases, symbolic links are what you want.

Common Reasons to Create a Symbolic Link

  • Sync folders across locations — point a config folder to a cloud-synced directory without moving the original
  • Avoid duplicate files — share one large folder between two applications without copying data
  • Manage dotfiles — developers commonly symlink configuration files from a central repo to their expected system paths
  • Redirect app data — move a program's data folder to another drive while keeping the original path intact

How to Create a Symbolic Link on Linux and macOS 🔗

Both Linux and macOS use the same Unix-based ln command. The syntax is: