Within military organizations, the commanding officer (often abbreviated to C.O.) was the officer in charge of a military unit. Typically the commanding officer had ultimate authority over the unit, and was usually given wide latitude within the bounds of military law. In this respect, commanding officers have significant responsibilities, duties and powers.
A commanding officer may have been of any rank of commissioned officer; usually there were more officers than command positions available, and time spent in command, referred to as seniority, was generally a key aspect of promotion; therefore the role of commanding officer was highly valued, and in theory only goes to the best officers.
In most militaries, the commanding officer was often assisted by an executive officer (also abbreviated as X.O.), whose job it was to handle personnel and day-to-day non-combat operations. Larger units, such as large capital-class warships, also played host to a whole collection of staff officers.