Hauptmann is a German word usually translated as captain when it is used as an officer's rank in the German, Austrian and Swiss armies. While "haupt" in contemporary German means "main", it also has the dated meaning of "head", i.e. Hauptmann literally translates to "head man", which is also the etymological root of "captain" (from Latin caput head). It equates to Captain in the British and US Armies, and is rated OF-2 in NATO.
More generally, it can be used to denote the head of any hierarchically structured group of people, often as a compound word. For example, a Feuerwehrhauptmann is the captain of a fire brigade, while the word Räuberhauptmann refers to the leader of a gang of robbers.
Official Austrian titles incorporating the word include Landeshauptmann, Bezirkshauptmann, Burghauptmann and Berghauptmann.
In Saxony during the Weimar Republic, the titles of Kreishauptmann and Amtshauptmann were held by senior civil servants.