| 1 |
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1. |
| 2 |
.TH LN "1" "February 2026" "GNU coreutils 9.10" "User Commands" |
| 3 |
.SH NAME |
| 4 |
ln \- make links between files |
| 5 |
.SH SYNOPSIS |
| 6 |
.B ln |
| 7 |
[\fI\,OPTION\/\fR]... [\fI\,-T\/\fR] \fI\,TARGET LINK_NAME\/\fR |
| 8 |
.br |
| 9 |
.B ln |
| 10 |
[\fI\,OPTION\/\fR]... \fI\,TARGET\/\fR |
| 11 |
.br |
| 12 |
.B ln |
| 13 |
[\fI\,OPTION\/\fR]... \fI\,TARGET\/\fR... \fI\,DIRECTORY\/\fR |
| 14 |
.br |
| 15 |
.B ln |
| 16 |
[\fI\,OPTION\/\fR]... \fI\,-t DIRECTORY TARGET\/\fR... |
| 17 |
.SH DESCRIPTION |
| 18 |
.\" Add any additional description here |
| 19 |
.PP |
| 20 |
In the 1st form, create a link to TARGET with the name LINK_NAME. |
| 21 |
In the 2nd form, create a link to TARGET in the current directory. |
| 22 |
In the 3rd and 4th forms, create links to each TARGET in DIRECTORY. |
| 23 |
Create hard links by default, symbolic links with \fB\-\-symbolic\fR. |
| 24 |
By default, each destination (name of new link) should not already exist. |
| 25 |
When creating hard links, each TARGET must exist. Symbolic links |
| 26 |
can hold arbitrary text; if later resolved, a relative link is |
| 27 |
interpreted in relation to its parent directory. |
| 28 |
.PP |
| 29 |
Mandatory arguments to long options are mandatory for short options too. |
| 30 |
.TP |
| 31 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln--backup'\fB\-\-backup[=CONTROL]\fP\X'tty: link' |
| 32 |
make a backup of each existing destination file |
| 33 |
.TP |
| 34 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-b'\fB\-b\fP\X'tty: link' |
| 35 |
like \fB\-\-backup\fR but does not accept an argument |
| 36 |
.TP |
| 37 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-d'\fB\-d, \-F, \-\-directory\fP\X'tty: link' |
| 38 |
allow the superuser to attempt to hard link directories, |
| 39 |
if supported by the system |
| 40 |
.TP |
| 41 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-f'\fB\-f, \-\-force\fP\X'tty: link' |
| 42 |
remove existing destination files |
| 43 |
.TP |
| 44 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-i'\fB\-i, \-\-interactive\fP\X'tty: link' |
| 45 |
prompt whether to remove destinations |
| 46 |
.TP |
| 47 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-L'\fB\-L, \-\-logical\fP\X'tty: link' |
| 48 |
dereference TARGETs that are symbolic links |
| 49 |
.TP |
| 50 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-n'\fB\-n, \-\-no\-dereference\fP\X'tty: link' |
| 51 |
treat LINK_NAME as a normal file |
| 52 |
if it is a symbolic link to a directory |
| 53 |
.TP |
| 54 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-P'\fB\-P, \-\-physical\fP\X'tty: link' |
| 55 |
make hard links directly to symbolic links |
| 56 |
.TP |
| 57 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-r'\fB\-r, \-\-relative\fP\X'tty: link' |
| 58 |
with \fB\-s\fR, create links relative to link location |
| 59 |
.TP |
| 60 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-s'\fB\-s, \-\-symbolic\fP\X'tty: link' |
| 61 |
make symbolic links instead of hard links |
| 62 |
.TP |
| 63 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-S'\fB\-S, \-\-suffix=\,SUFFIX\fP\X'tty: link'\/\fR |
| 64 |
override the usual backup suffix |
| 65 |
.TP |
| 66 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-t'\fB\-t, \-\-target\-directory=\,DIRECTORY\fP\X'tty: link'\/\fR |
| 67 |
specify the DIRECTORY in which to create the links |
| 68 |
.TP |
| 69 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-T'\fB\-T, \-\-no\-target\-directory\fP\X'tty: link' |
| 70 |
treat LINK_NAME as a normal file always |
| 71 |
.TP |
| 72 |
\X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#ln-v'\fB\-v, \-\-verbose\fP\X'tty: link' |
| 73 |
print name of each linked file |
| 74 |
.TP |
| 75 |
\X'tty: link https://www.gnu.org/software/coreutils/ln#ln--help'\fB\-\-help\fP\X'tty: link' |
| 76 |
display this help and exit |
| 77 |
.TP |
| 78 |
\X'tty: link https://www.gnu.org/software/coreutils/ln#ln--version'\fB\-\-version\fP\X'tty: link' |
| 79 |
output version information and exit |
| 80 |
.PP |
| 81 |
The backup suffix is '~', unless set with \fB\-\-suffix\fR or SIMPLE_BACKUP_SUFFIX. |
| 82 |
The version control method may be selected via the \fB\-\-backup\fR option or through |
| 83 |
the VERSION_CONTROL environment variable. Here are the values: |
| 84 |
.TP |
| 85 |
none, off |
| 86 |
never make backups (even if \fB\-\-backup\fR is given) |
| 87 |
.TP |
| 88 |
numbered, t |
| 89 |
make numbered backups |
| 90 |
.TP |
| 91 |
existing, nil |
| 92 |
numbered if numbered backups exist, simple otherwise |
| 93 |
.TP |
| 94 |
simple, never |
| 95 |
always make simple backups |
| 96 |
.PP |
| 97 |
Using \fB\-s\fR ignores \fB\-L\fR and \fB\-P\fR. Otherwise, the last option specified controls |
| 98 |
behavior when a TARGET is a symbolic link, defaulting to \fB\-P\fR. |
| 99 |
.SH AUTHOR |
| 100 |
Written by Mike Parker and David MacKenzie. |
| 101 |
.SH "REPORTING BUGS" |
| 102 |
Report bugs to: bug\[email protected] |
| 103 |
.br |
| 104 |
GNU coreutils home page: <https://www.gnu.org/software/coreutils/> |
| 105 |
.br |
| 106 |
General help using GNU software: <https://www.gnu.org/gethelp/> |
| 107 |
.br |
| 108 |
Report any translation bugs to <https://translationproject.org/team/> |
| 109 |
.SH "SEE ALSO" |
| 110 |
\fBlink\fP(2), \fBsymlink\fP(2) |
| 111 |
.PP |
| 112 |
.br |
| 113 |
Full documentation <https://www.gnu.org/software/coreutils/ln> |
| 114 |
.br |
| 115 |
or available locally via: info \(aq(coreutils) ln invocation\(aq |
| 116 |
.PP |
| 117 |
.br |
| 118 |
Packaged by Debian (9.10\-1) |
| 119 |
.br |
| 120 |
Copyright \(co 2026 Free Software Foundation, Inc. |
| 121 |
.br |
| 122 |
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. |
| 123 |
.br |
| 124 |
This is free software: you are free to change and redistribute it. |
| 125 |
.br |
| 126 |
There is NO WARRANTY, to the extent permitted by law. |