ln
creates links between files
TLDR
Create symbolic link
$ ln -s [target] [linkname]
Create hard link$ ln [target] [linkname]
Create symbolic link (force overwrite)$ ln -sf [target] [linkname]
Create link in directory$ ln -s [target] [directory/]
Create relative symbolic link$ ln -sr [target] [linkname]
Verbose output$ ln -sv [target] [linkname]
SYNOPSIS
ln [options] target linkname
DESCRIPTION
ln creates links between files. Hard links share the same inode; symbolic links are references.
Symbolic links can span filesystems and link to directories. Hard links cannot.
PARAMETERS
TARGET
File or directory to link to.LINKNAME
Name for the link.-s
Create symbolic (soft) link.-f
Force, overwrite existing.-r
Create relative symbolic link.-v
Verbose output.-n
Don't dereference symlinks.--help
Display help information.
CAVEATS
Hard links cannot cross filesystems. Symbolic links can break if target moves. Directory hard links not allowed.
HISTORY
ln is a traditional Unix command dating back to the original Unix system for creating links between files.
