LN(1)
π LN(1) β the link-making manual, bestie edition π
okay so you wanna know about ln? the link-making queen of the Unix world? you've come to the right girlie. this is ln from the General Commands Manual, and I'm gonna walk you through it like we're texting at 2am. no cap. π«Ά
β¨ NAME β¨
ln β make links between files. that's it. that's the whole job. she links. she slays. π
πΈ SYNOPSIS πΈ
four whole forms, bestie, don't panic:
ln [OPTION]... [-T] TARGET LINK_NAME
ln [OPTION]... TARGET
ln [OPTION]... TARGET... DIRECTORY
ln [OPTION]... -t DIRECTORY TARGET...
π¦ DESCRIPTION π¦
Make links between files. periodt. π
π OPTIONS π
one bullet per flag, no skipping, we do NOT leave the boring ones out in this house:
--backup[=<CONTROL>]β makes a backup of every destination file that already exists. like a save point before you do something unhinged π«Ά-bβ same energy as--backupbut she doesn't take an argument. no=, no nothing.-f,--forceβ yeets the existing destination files out of existence. remove first, ask never. π₯-i,--interactiveβ asks you before it removes any existing destination file. consent era, we love to see it π-n,--no-dereferenceβ ifLINK_NAMEis a symbolic link pointing at a directory, treat it like a normal file. don't go chasing the link, girl, just look at her directly π-L,--logicalβ followTARGETs that are symbolic links. chase them down the rabbit hole π-P,--physicalβ make hard links directly to symbolic links. no following, no detours, straight to the link itself π-s,--symbolicβ makes symbolic links instead of hard links. the classic.-S,--suffix <SUFFIX>β override the usual backup suffix. you pick your own little garnish π-t,--target-directory <DIRECTORY>β tells her whichDIRECTORYto create the links in. "put it here pls" π-T,--no-target-directoryβ treatLINK_NAMEas a normal file. always. no exceptions, no vibes check, just a file β¨-r,--relativeβ makes symbolic links relative to the link location. portable queen behavior π-v,--verboseβ prints the name of every single file she linked. she's being chatty and honestly? iconic π¬-h,--helpβ Print help-V,--versionβ Print version<files>β the files, bestie. the actual files. π
π EXTRA π
okay here's where the real tea is, so sit down (or don't, I'm not your mom).
In the 1st form, you create a link to TARGET with the name LINK_NAME. In the 2nd form, you create a link to TARGET in the current directory. In the 3rd and 4th forms, you create links to each TARGET in DIRECTORY.
By default she makes hard links. With --symbolic you get symbolic links instead. And by default, every destination β that's the name of the new link β should not already exist. so if it does exist, that's a problem situation, not a me problem.
When you're making hard links, every TARGET must exist. non-negotiable. girl has to be real.
Symbolic links can hold arbitrary text, which is lowkey wild if you think about it too long. If it gets resolved later, a relative link is interpreted in relation to its parent directory. π§
π the backup suffix situation π
The backup suffix is '~'. unless you set it with --suffix or the SIMPLE_BACKUP_SUFFIX environment variable, in which case it's whatever you said. π
You can pick your version control method with the --backup option or through the VERSION_CONTROL environment variable. here are the values, laid out like a lil menu:
none,offβ never make backups. not even if--backupis given. she simply refuses πnumbered,tβ make numbered backupsexisting,nilβ numbered if numbered backups exist, simple otherwisesimple,neverβ always make simple backups
bestie note:none/offreally means even if--backupis given. like, you asked, and she still said no. that's the rule, don't fight it. π
π VERSION π
v(uutils coreutils) 0.12.0 β¨
π EXAMPLES π
Create a symbolic link to a file or directory:
ln [-s|--symbolic] /path/to/file_or_directory path/to/symlink
Create a symbolic link relative to where the link is located:
ln [-s|--symbolic] path/to/file_or_directory path/to/symlink
Overwrite an existing symbolic link to point to a different file:
ln [-sf|--symbolic --force] /path/to/new_file path/to/symlink
Create a hard link to a file:
ln /path/to/file path/to/hardlink
The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail. π (she's growing, okay, be nice.)
mwah that's the whole page, bestie. go forth and link responsibly. this was LN(1) from uutils coreutils 0.12.0, dated 2026-09-25 β and yes I remembered the date because I'm that girl. ππβ¨
π¦ where this page comes from
- ubuntu stonking: rust-coreutils 0.12.0-1ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms