Glossary

Hard link

A second, equally real name for the same file.

A hard link is another directory entry pointing at an existing inode. Both names are equally "the real file" — there is no original and no copy, and the data survives until every hard link is removed.

Because inode numbers are only meaningful within one filesystem, hard links cannot cross filesystems, and they cannot point at directories (that would let the tree contain cycles). ls -l shows the link count in its second column.

See it in practice

$ ln notes.txt second-name && ls -li notes.txt second-name

Same inode number, link count now 2. Delete either name and the data survives in the other.

Where you'll meet it

ln

Make one file reachable from several paths — and understand symlinks vs hard links.

ls

List the contents of a directory, with options for hidden files, long format, sorting and more.

Inode

The structure that IS a file — metadata plus pointers to its data.

Symbolic link (symlink)

A small file containing a path, resolved on every access.

Learn these concepts by typing them: the interactive course builds them up lesson by lesson in a real simulated shell.