LN(1)
π LN(1) β ln
okay bestie, sit down, we're learning ln today and honestly? it's giving "tiny command, huge power". β¨
πΈ NAME
ln β make links between files π
π SYNOPSIS
ln [OPTION]... [-T] TARGET LINK_NAME
ln [OPTION]... TARGET
ln [OPTION]... TARGET... DIRECTORY
ln [OPTION]... -t DIRECTORY TARGET...
π¦ DESCRIPTION
Okay so there's four whole ways to run this thing, and each one is a different mood:
- the 1st form β make a link to TARGET with the name LINK_NAME π«
- the 2nd form β make a link to TARGET in the current directory (right where you're standing, no cap)
- the 3rd and 4th forms β make links to each TARGET in DIRECTORY ποΈ
By default you get hard links, but if you say --symbolic you get symbolic links instead. And by default, each destination (that's the name of the new link) should not already exist β the command is NOT gonna just bulldoze stuff for you, no ma'am. π
When you're creating hard links, every single TARGET must exist. Symbolic links on the other hand can hold arbitrary text β like, literally whatever β and if it ever gets resolved later, a relative link is interpreted in relation to its parent directory. iykyk. π§
Mandatory arguments to long options are mandatory for short options too. (This applies everywhere, forever, it's just how GNU works bestie.)
β¨ the options, one by one π
--backup[=CONTROL]β make a backup of each existing destination file π«Ά-bβ like--backupbut does not accept an argument-d,-F,--directoryβ allow the superuser to attempt to hard link directories, if supported by the system π-f,--forceβ remove existing destination files π₯-i,--interactiveβ prompt whether to remove destinations π-L,--logicalβ dereference *TARGET*s that are symbolic links-n,--no-dereferenceβ treat LINK_NAME as 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 π-S,--suffix=SUFFIXβ override the usual backup suffix-t,--target-directory=DIRECTORYβ specify the DIRECTORY in which to create the links ποΈ-T,--no-target-directoryβ treat LINK_NAME as a normal file always-v,--verboseβ print name of each linked file π£οΈ--helpβ display this help and exit--versionβ output version information and exit
π about them backups
The backup suffix is '~', unless you set it with --suffix or the SIMPLE_BACKUP_SUFFIX environment variable. And the version control method (the vibe of your backups, basically) can be picked via the --backup option or through the VERSION_CONTROL environment variable. Here are the values, bestie:
none,offβ never make backups (even if--backupis given) πnumbered,tβ make numbered backups π’existing,nilβ numbered if numbered backups exist, simple otherwisesimple,neverβ always make simple backups
π one more thing, this one matters
Using -s ignores -L and -P. Otherwise, the last option specified controls behavior when a TARGET is a symbolic link, defaulting to -P.
π AUTHOR
Written by Mike Parker and David MacKenzie. iconic behavior, honestly. π
π REPORTING BUGS
Found a bug? Tell the people:
- Report bugs to:
bug-coreutils@gnu.org - GNU coreutils home page:
https://www.gnu.org/software/coreutils/ - General help using GNU software:
https://www.gnu.org/gethelp/ - Report any translation bugs to:
https://translationproject.org/team/
π SEE ALSO
link(2),symlink(2)- Full documentation at
https://www.gnu.org/software/coreutils/lnβ or available locally via:info '(coreutils) ln invocation'
Packaged by Ubuntu (9.10-1ubuntu2), 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.
okay periodt, that's the whole page bestie β this one's from GNU coreutils 9.10, dated August 2026, and it lives in the LN(1) section of the manual. now go make some links and slay ππ¦β¨
π¦ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms