LN(1)
๐ LN(1) โ like, the link-making one ๐
okay bestie, sit down, hydrate, because today we're talking about ln โ a User Commands girly who literally just makes links between files. that's it. that's the whole job. and she ate. โจ
๐ธ NAME ๐ธ
ln โ make links between files ๐ฆ
โจ SYNOPSIS โจ
four whole forms, she's versatile, she contains multitudes:
ln [OPTION]... [-T] TARGET LINK_NAME
ln [OPTION]... TARGET
ln [OPTION]... TARGET... DIRECTORY
ln [OPTION]... -t DIRECTORY TARGET...
๐ DESCRIPTION ๐
so here's the tea, and it's giving four flavors:
- form 1 โ you make a link to
TARGETand it gets the nameLINK_NAME. - form 2 โ you make a link to
TARGETright in the current directory. cozy. - forms 3 and 4 โ you make links to each
TARGET, all of them, every single one, insideDIRECTORY.
by default she makes hard links (no cap), and symbolic links only if you say --symbolic. by default, each destination โ that's the name of the new link โ should not already exist. she's not trying to overwrite your whole life, okay?
when you're making hard links, every single TARGET must exist. no exceptions, she will simply refuse. symbolic links though? those can hold arbitrary text โ literally whatever. and if someone resolves them later, a relative link gets interpreted in relation to its parent directory. iykyk. ๐ง
mandatory arguments to long options are mandatory for short options too. that's just how it is. it's giving equal treatment. periodt.
๐ the flags, one by one ๐
--backup[=CONTROL]โ make a backup of each existing destination file. she's considerate like that.-bโ like--backupbut she does not accept an argument. noCONTROLfor you.-d,-F,--directoryโ allow the superuser to attempt to hard link directories, if supported by the system. yes the wording is doing a lot of work there, we don't make the rules ๐-f,--forceโ remove existing destination files. bye bye. ๐ญ-i,--interactiveโ prompt whether to remove destinations. she asks first, she's polite ๐ซถ-L,--logicalโ dereferenceTARGETs that are symbolic links-n,--no-dereferenceโ treatLINK_NAMEas a normal file if it is a symbolic link to a directory-P,--physicalโ make hard links directly to symbolic links-r,--relativeโ with-s, create links relative to link location-s,--symbolicโ make symbolic links instead of hard links. the soft girl option โจ-S,--suffix=SUFFIXโ override the usual backup suffix-t,--target-directory=DIRECTORYโ specify theDIRECTORYin which to create the links-T,--no-target-directoryโ treatLINK_NAMEas a normal file always-v,--verboseโ print name of each linked file. she's a yapper and we love her for it ๐ฌ--helpโ display this help and exit--versionโ output version information and exit
๐ backup behavior, the lore ๐
the backup suffix is '~' โ cute, right? unless you set it with --suffix or the SIMPLE_BACKUP_SUFFIX environment variable. the version control method can be picked via the --backup option or through the VERSION_CONTROL environment variable. here are the values, bestie, memorize them:
none,offโ never make backups (even if--backupis given). she's in her "no thoughts head empty" era.numbered,tโ make numbered backupsexisting,nilโ numbered if numbered backups exist, simple otherwisesimple,neverโ always make simple backups
โญ the rule that controls the chaos โญ
using -s ignores -L and -P. gone. irrelevant. otherwise, the last option specified controls behavior when a TARGET is a symbolic link, and it defaults to -P. last one wins, that's the law ๐
๐ AUTHOR ๐
Written by Mike Parker and David MacKenzie. absolute icons, honestly. ๐
๐ REPORTING BUGS ๐
found a bug? spill it, don't hold it in:
- Report bugs to: <bug-coreutils@gnu.org>.
- Report any translation bugs to: <https://translationproject.org/team/>.
- GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
- General help using GNU software: <https://www.gnu.org/gethelp/>
๐ COPYRIGHT ๐
Copyright ยฉ 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
this is free software: you are free to change and redistribute it. there is NO WARRANTY, to the extent permitted by law. read it and weep (affectionately) ๐
๐ฆ SEE ALSO ๐ฆ
full documentation <https://www.gnu.org/software/coreutils/ln> โ or available locally via: info '(coreutils) ln invocation'
and that's the whole page, bestie!! this was GNU coreutils 9.12, dated September 2026, and she is serving link energy like nobody's business. go make some links, drink some water, ily ๐๐๐ธ๐ฆโจ๐
๐ฆ where this page comes from
- arch rolling: coreutils 9.12-2 ยท GPL-3.0-or-later AND GFDL-1.3-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms