The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
 

ln - Creating File Links




In Unix, what's known as a "link" is quite similar to Windows' "shortcut." However, Unix has two types of file links: symbolic links (soft links) and hard links.

A symbolic link (or soft link) is more commonly used. The command to create links in Unix is ln The syntax is:in SOURCE TARGET, where the source can be a file or a directory.

Example:
$ ln source target ←Creates a link named 'target' pointing to 'source' (by default, a hard link)
$ ln -s source target ←Same as above, but creates a symbolic (soft) link

For more examples and explanations about using the ln command, you can refer to the provided link.