Quartermaster is a military term, the meaning of which depends on the country and service. In land armies, a quartermaster is generally a relatively senior soldier who supervises stores or barracks and distributes supplies and provisions. In many navies, a quartermaster is an officer with particular responsibility for steering and signals. The seaman is a non-commissioned officer (petty officer) rank; in some others, it is not a rank but a role related to navigation.
The term appears to derive from the title of a German royal official, the Quartiermeister. This term meant "master of quarters" (where "quarters" refers to lodging or accommodation). Alternatively, it could have been derived from "master of the quarterdeck" where the helmsman and captain controlled the ship. The term's first use in English was as a naval term, which entered English in the 15th century via the equivalent French and Dutch naval titles quartier-maître and kwartier-meester, respectively. The term began to refer to army officers in English around 1600.
For land armies, the term was first coined in Germany as Quartiermeister and initially denoted a court official with the duty of preparing the monarch's sleeping quarters. In the 17th century, it started to be used in various militaries in the sense of organizing supplies.
In the British Army and Royal Marines, the quartermaster (QM) is the commissioned officer in a battalion or regiment responsible for supply. By longstanding tradition, they are always commissioned from the ranks and hold the rank of captain or major (although until the 20th century the quartermaster was usually a lieutenant). Some units also have a technical quartermaster, who is in charge of technical stores. The quartermaster is assisted by the regimental quartermaster sergeant (RQMS) (and the technical quartermaster by the technical quartermaster sergeant (TQMS)) and a staff of storemen. The QM, RQMS and storemen are drawn from the regiment or corps in which they work, not from the Royal Logistic Corps (formerly the Royal Army Service Corps and then the Royal Army Ordnance Corps/Royal Corps of Transport), which is responsible for issuing and transporting supplies to them. Units which specialize in supply are known as "supply" units, not "quartermaster" units, and their personnel as suppliers or logistics specialists ("log specs"). Traditionally, the quartermaster had previously served as RQMS and then regimental sergeant major (RSM) of the unit of which he later became quartermaster.
From at least the English Civil War period until 1813, the quartermaster was the senior NCO in a British cavalry troop, in which context he had nothing to do with supply. In that year, the position was replaced by the new appointment of troop sergeant major, with the cavalry adopting commissioned, regimental quartermasters as described above.
From Royal Canadian Ordnance Corps standing orders:
For many centuries – indeed perhaps as long as there have been organized military units – the appointment of quartermaster has been significant in armies. Until recent times, the British Army almost invariably rewarded an outstanding RSM by appointing him quartermaster of his battalion, thus ensuring the unit an experienced officer who knew the unit thoroughly and would prove difficult to mislead or beguile. [The past tense is in fact incorrect, as the British Army still has this policy.] As the complexities of the Army and its material increased, an officer with greater professional technical knowledge of the problems that surround stores management was required for the Quartermaster's duties. Under authority of Canadian Army Order 201 – 16 dated 8 February 1954, the Royal Canadian Ordnance Corps assumed these responsibilities and undertook to train and provide unit quartermasters and staff for all corps of the Canadian Army (Regular) except the Royal Canadian Corps of Signals, Royal Canadian Army Medical Corps and Royal Canadian Dental Corps.
In recent years, the quartermaster has been a specially trained officer of the Royal Canadian Logistics Service, though CFR (commissioned from ranks) officers have been known to accept regimental appointments such as quartermaster.
The quartermaster was responsible for intelligence operations in the Imperial Russian Army.
Main article: Quartermaster Corps (United States Army)
In the United States Army, the term is used to describe all supply personnel and units that are part of the United States Army Quartermaster Corps (USQMC) which was formerly the Quartermaster Department. It is a Sustainment, formerly combat service support (CSS), branch of the United States Army. It is also one of three U.S. Army logistics branches, the others being the Transportation Corps and the Ordnance Corps.
In the Swiss Army, a quartermaster (Qm) is an officer (from 2 Lt. to colonel) in charge with the coordination of the Kommissariatsdienst (accountancy, post-service, fuel resupply, "all sort of food" resupply and others) of a battalion, regiment and brigade/division. His function is more a control and supervision function: a staff officer for the respective commander. The Qm has a direct subordinate at company level: it is the company quartermaster sergeant (QMS – the English definition for international engagement and also a new grade insignia = see "Gradstrukturen der Armee XXI_revidiert" since 2001 on Swiss army ranks). The company quartermaster sergeant is known since the 18th century as Fourier or Einheits-Fourier and has the rank equivalent of a senior non-commissioned-officer like the company sergeant major (since 2001 company chief sergeant major, CMS) and they are ranked (for better understanding in NATO-ranks even though Switzerland, as a neutral state, is not part of NATO) OR-7 in the senior NCO's category (in German: Höhere Unteroffiziere). For technical questions, the QMS is subordinated to the Qm officer (Qm 2 Lt, Qm 1 lt or Qm captain incorporated in the staff of a battalion/group). The tasks of resupply are assigned at company level to the two SNCO's (CSM and QMS). The QMS is the material executor of the Qm tasks at company level and for the command chain together with the CSM, directly subordinated to the company commander (captain) as staff NCOs. The Fourier is also the substitute of the chief sergeant major (Hauptfeldweibel), if considering the command platoon by itself.
In the IDF, the battalion quartermaster is also the commander of the battalions support company, known as the battalion headquarters company. In the standing army he is usually a captain, but the role is a major's role. In the reserve army he is usually a major. While most of the staff officers are directly under the command of the battalion commander, the quartermaster has a lieutenant, a logistics officer and a junior ordnance officer (the battalion's ordnance platoon commander) under his direct command. He is in charge of all logistics issues in the battalion and also in charge of the battalion's headquarter's day-to-day life. He is commissioned as an officer by the ramatkal (the army's general chief of staff), and as a logistic officer by kalar (the army's general logistic officer). In large camps and higher headquarters (brigade, division and corps HQ), apart from the staff officer in charge of logistics, there is also a role defined mostly as "camp commander," who is in charge of the HQ logistic issues, ceremonies and parades and discipline. These duties differ slightly in the air force and navy. The ranks of IDF quartermasters vary from sergeant major to CWO, depending on the size of the camp. However, most soldiers refer to him as rasar (the Hebrew acronym for the rank of 2WO) without regarding his actual rank. Quartermasters are identified (in all IDF branches) by wearing a blue-white aiguillette on their left shoulder.
Pirates during the Golden Age of Piracy elevated the rank of quartermaster to much higher powers and responsibilities than it had aboard non-pirate merchant or naval vessels. On pirate ships, the quartermaster was often granted a veto power by a pirate ship's "Articles of Agreement", in order to create an officer who could counterbalance the powers of the pirate captain. Pirate quartermasters, like pirate captains, were usually elected by their crews.
It was often the quartermaster's responsibility to lead the pirate boarding party when boarding another ship. This was usually done from the quarter deck (the place where two ships touched during the boarding attack).
The quartermaster ranked higher than any other officer aboard the ship except the captain himself, and could veto the captain's decisions whenever the ship was not chasing a prize or engaged in battle. The quartermaster also was chiefly responsible for discipline, assessing punishments for crewmen who transgressed the articles.
According to pirate Captain Charles Johnson, ghost author of the 18th century source, A General History of the Robberies and Murders of the most notorious Pyrates, aboard a pirate ship "the Captain can undertake nothing which the Quarter-Master does not approve. We may say, the Quarter-Master is a humble Imitation of the Roman Tribune of the People; he speaks for, and looks after the Interest of the Crew."
Several quartermasters, notably among them Calico Jack Rackham, became captains after their previous captain was killed or deposed. 
A Scout quartermaster within the Scout movement is responsible for maintaining all the normal camping supplies in a Scout troop or pack. This may include, but is not limited to, camping supplies, tents, "chuck boxes" (containers holding food and cooking supplies), stoves, camp fuel (propane, naphtha, etc.), tarps, camping trailers, dining flys, etc.
The Quartermaster Award is also the highest rank in the Sea Scouts, BSA, an older youth (age 13–21) co-ed program. A quartermaster (kwartiermeester) is in the Netherlands the assistant patrol leader of a Sea Scout patrol (Bak), in Flanders it is the patrol leader of a Sea Scout patrol (Kwartier).