The ettin, H, is a type of monster that appears in NetHack. They are giant humanoids that are close to giants in many respects, but do not have the
M2_GIANT flag and are considered animals rather than intelligent monsters.
Ettins are strong and move as fast as a player without speed; they can hit fairly hard and often, but lack the boulder-hurling strength of their giant cousins, though they are capable of using other projectiles. An ettin's lack of MR score and inability to wear armor renders them quite vulnerable against a well-kitted player - most who encounter ettins have already dealt with their undead kin, and are generally able to fight live ones with little trouble.
The ettin has been present in the game since Hack for PDP-11, a variant of Jay Fenlason's Hack - from this version to the publicly distributed versions of Hack edited by Andries Brouwer, they used the e glyph. Their undead forms were introduced in NetHack 3.0.0.
A commented-out interaction is present in the code that would give YAFM when using the #chat extended command and selecting yourself while in the form of an ettin ("You discover that your other head makes boring conversation."); the rationale was that it would raise all sorts of questions about ettins being able to wear multiple helms or amulets, as well as similar queries about multi-limbed monsters such as the marilith.
The word "ettin" is an archaic English word, derived from the Old English Eoten and cognate to the Germanic/Old Norse Jötunn. Each of these words has been used to mean "giant" in some fashion. Their portrayal as two-headed and giant-like may be derived from J. R. R. Tolkien: the Ettenmoors are a region in Middle Earth inhabited by trolls, and Tolkien's Guide to the Names in The Lord of the Rings states the root to be the word eten which means “troll" or "ogre”; the second chapter of The Hobbit also has a character comment on trolls as being slovenly and lacking table manners, "even those with only one head each", implying that trolls are normally two-headed.
The ettins from Dungeons & Dragons, and many later portrayals of ettin, are likely patterned after this - Dungeons & Dragons ettins are generally ugly and very unintelligent brutes that also possess some orcish traits, and are descended from giants through the lineage of the two-headed Julian and Arno, Annam the All-Father's weakest sons. Their names translate in-universe to "ugly giant" in ancient Common and "runt" in Jotun; they are chaotic-aligned and have even worse table manners than Tolkien's trolls. Giant two-headed trolls, or "fell trolls", also exist in the setting and are believed to be a cross between troll and ettin.
The first Monster Manual depicts ettins as nocturnal two-headed giants that dwell in remote places and live underground, and establishes the ettin's advantages against stealthy foes that are used in later editions. NetHack borrows these elements, as well as their hit die (2-16 using the left arm and 3-18 using the right), with their lack of intelligence as the apparent rationale for the "animal" flag.
The two-headed giant, or ettin, is a vicious and unpredictable hunter that stalks by night and eats any meat it can catch.