(noun) compartment on a ship or aircraft; small rural dwelling
Both meanings were present in Shakespeare's time. The transport sense is used several times - such as by the boatswain in The Tempest: "Keep your cabins@ (I.i.14).
However, when Shakespeare uses cabin in its "dwelling" sense, it has a different meaning from that found today, where it refers to (a) a building, which is (b) permanent.
When Viola tells Olivia that a wooer should make "a willow cabin at your gate" (Twelfth Night, I.v.257), she is talking about constructing a temporary hut or shelter, not building some sort of log cabin.
A different sense is seen when Venus tells Adonis of a boar: "O, let him keep his loathsome cabin still"(Venus and Adonis, l. 637). Here the word means a natural hole in the ground - a den or cave.
And it is this sense which is used metaphorically later in the poem: "So at his bloody view her eyes are fled Into the deep-dark cabins of her head" (l. 1038) - in other words, eye-sockets.
David Crystal is author, with Ben Crystal, of Shakespeare's Words, published by Penguin, now available on a subscription website: www.shakespeareswords.com