ln (Unix)
The ln
command is a standard Unix command utility used to create a hard link or a symbolic link (symlink) to an existing file or directory. The use of a hard link allows multiple filenames to be associated with the same file since a hard link points to the inode of a given file, the data of which is stored on disk. On the other hand, symbolic links are special files that refer to other files by name.
Example usage of ln utility | |
Original author(s) | AT&T Bell Laboratories |
---|---|
Developer(s) | Various open-source and commercial developers |
Initial release | November 3, 1971 |
Operating system | Unix, Unix-like, IBM i |
Platform | Cross-platform |
Type | Command |
License | coreutils: GPLv3+ |
The ln
command by default creates hard links, and when called with the command line parameter ln -s
creates symbolic links. Most operating systems prevent hard links to directories from being created since such a capability could disrupt the structure of a file system and interfere with the operation of other utilities. The ln
command can however be used to create symbolic links to non-existent files.