# Ubuntu – Why does directory contain 2 hard links

Every directory has a link to itself and its parent (that's why . of an empty directory will have a link count of 2). But because every directory links to its parent, any directory that has a subdirectory will have a link from that child. Thus the link count of a directory is 2 + the number of directories immediately contained by it.