Symbolic Link

A symbolic link (or "symlink") is file system feature that can be used to create a link to a specific file or folder. It is similar to a Windows "shortcut" or Mac "alias," but is not an actual file. Instead, a symbolic link is a entry in a file system that points to a directory or file. The system recognizes the symbolic link as the actual directory or file, providing a alternate way to access it.

Symbolic links are supported by Mac, Windows, and Unix, but are most commonly found on Unix systems, since Unix is known for having a large (and often confusing) hierarchy of directories. The root folder alone has several different subdirectories, many of which do not have a clearly defined purpose. Examples include bin, dev, etc, lib, tmp, usr, and var. This can make it difficult to find certain files, especially if they are located several directories deep in the file system. Symbolic links help alleviate this problem by creating an easier way to access common files and folders.

To create a symlink in Unix, you can type a simple command at the command prompt using the syntax below. (The "-s" part of the command is important, since it tells the system to create a symbolic link.)

ln -s [target directory or file] /[shortcut]

For example, you can create a symlink "/apachelogs" that points to "/usr/local/apache/logs" using the following command:

ln -s /usr/local/apache/logs /apachelogs

After entering the command above, you would be able to access the Apache logs directory by simply opening "/apachelogs." While symlinks are recognized by most programs, it may be necessary to enable a program or process to follow symbolic links. For example, in order for an Apache web server to recognize symbolic links, the line "Options +FollowSymLinks" must be added to the httpd.conf file.

Updated October 22, 2013 by Per C.

quizTest Your Knowledge

Which of the following might cause a race condition in a software program?

A
Memory is not freed when it is no longer used.
0%
B
Pipelining is not enabled on a multi-core system.
0%
C
A function result depends on the timing of another function.
0%
D
A class references elements of a subclass.
0%
Correct! Incorrect!     View the Race Condition definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Symbolic Link on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.