Cabin (ship)
A cabin or berthing is an enclosed space generally on a ship or an aircraft. A cabin which protrudes above the level of a ship's deck may be referred to as a deckhouse.

Sailing ships

In sailing ships, the officers and paying passengers would have an individual or shared cabin.  The captain or commanding officer  would occupy the "great cabin" that normally spanned the width of the stern and had large windows. 

On a warship, it was a privileged area, separate from the rest of the ship, for the exclusive use of the captain. In large warships, the cabin was subdivided into day and night cabins (bedrooms) by movable panels, called bulk-heads, that could be removed in time of battle to leave the cabin clear for the gunners to use the stern chasers several of which were usually stationed in the cabin.

On large three decker warships in the age of sail the captain's cabin was sometimes appropriated by the Admiral. The captain would be consigned to the cabin below on the middle gun-deck.

Modern warships

In most modern warships, the commanding officer has a main cabin—the in-port cabin, often adjacent to the ship's central control room (operations room)—and a sea cabin adjacent to the bridge. Thus, when likely to be called from sleep or attending to administration, the commanding officer can go to the sea cabin and thereby be able to appear at the bridge or operations room immediately. The sea cabin is sparsely equipped, containing just a bunk, a desk, and basic toilet facilities. The in-port cabin is more lavishly furnished, with separate bedroom and combination sitting room/office, and more elaborate toiletry facilities.

For ships intended to act as flagships, like the former United States Navy aircraft carrier —now a museum ship—the admiral also has a sea cabin (adjacent to the captain's sea cabin) and an in-port cabin, in addition to the captain's cabins. Admiral Fletcher's sea cabin in the aircraft carrier  during World War II had a bed, an easy chair, a table, and a shower.

Officers normally have their own cabins—sometimes referred to as staterooms—which double as their offices. Some senior petty officers may have cabins for similar reasons.

Sailors sleep in berthing areas.

Passenger ships
In ships carrying passengers, they are normally accommodated in cabins, taking the terminology familiar to seafarers. First-class cabins were traditionally referred to as staterooms, and today many cruise lines now prefer to refer to passenger cabins as staterooms or suites.

Cabin crawl
In cruise ship terms, a cabin crawl is an event where passengers tour the cabins of fellow passengers. A cruise ship may also offer a cabin crawl of cabins or suites which did not sell for a particular sailing. The purpose of a cabin crawl is to give passengers an idea of the space and layout of various cabin options for their next cruise. Cabin crawls are normally organized prior to a cruise, through cruise-fan websites.

Spacecraft
In spacecraft, cabins are required to fully supply food and oxygen for their crew. On missions lasting a year or longer, the cabins have to be self-sustaining, i.e. replenish their own water and oxygen. The space cabin for any long-range manned mission is expected to be reasonably spacious, with approximately 28 cubic metres allotted to each occupant. In addition, cabins have life support systems that should have the capability to meet a variety of off-nominal conditions, including cabin fires, depressurization, and component shutdown or failure. Frequently, these conditions occur so quickly that recovery can be provided only by automatic control systems. In the late 1960s, several experimental ground facilities were developed to evaluate regenerative life support systems for crewed space flight.