Aboard military and commercial ships, boatswain, pronounced "bos'n" and often phonetically written "bosun", is the designation both of a rating (i.e., specialty) and the title of the senior individual in the specialty. Aboard U.S. naval vessels, the boatswains are in the "deck division". By tradition in the Royal Navy, unless there is explicit designation of another individual, the senior boatswain is considered the senior warrant or petty officer of the ship. Boatswains' Mates are more junior.
Boatswains deal with the core tasks of making a ship work: line handling, deck maintenance, anchoring, etc. Part of their traditional role, in managing the deck, includes "piping aboard" dignitaries using the hand-held whistle that has become a badge of office.
On sailing ships, they directed the crew handling the sails and its rigging. On modern vessels, they directly supervise complex operations such as the actual transfer of material during underway replenishment, while other specialists navigate and steer.