Quick Answer: How to Create a Symbolic Link in Linux?
Contents

To create a hard links on a Linux or Unix-like system:

  • Create hard link between sfile1file and link1file, run: ln sfile1file link1file.
  • To make symbolic links instead of hard links, use: ln -s source link.
  • To verify soft or hard links on Linux, run: ls -l source link.

A symbolic link, also termed a soft link, is a special kind of file that points to another file, much like a shortcut in Windows or a Macintosh alias. Unlike a hard link, a symbolic link does not contain the data in the target file. It simply points to another entry somewhere in the file system.

rm and unlink commands to remove symbolic link. rm: is the terminal command to remove each given file including symbolic links. Because a symbolic link is considered as a file on Linux, you can delete it with the rm command.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest