A barrack or barracks is a building or group of buildings built to house soldiers. The English word comes via French from an old Catalan word "barraca" (hut), originally referring to temporary shelters or huts for various people and animals, but today barracks are usually permanent buildings for military accommodation. The word may apply to separate housing blocks or to complete complexes, and the plural form often refers to a single structure and may be singular in construction.
The main object of barracks is to separate soldiers from the civilian population and reinforce discipline, training, and esprit de corps. They have been called "discipline factories for soldiers". Like industrial factories, some are considered to be shoddy or dull buildings, although others are known for their magnificent architecture such as Collins Barracks in Dublin and others in Paris, Berlin, Madrid, Vienna, or London. From the rough barracks of 19th-century conscript armies, filled with hazing and illness and barely differentiated from the livestock pens that housed the draft animals, to the clean and Internet-connected barracks of modern all-volunteer militaries, the word can have a variety of connotations.
Early barracks such as those of the Roman Praetorian Guard were built to maintain elite forces. There are a number of remains of Roman army barracks in frontier forts such as Vercovicium and Vindolanda. From these and from contemporary Roman sources we can see that the basics of life in a military camp have remained constant for thousands of years. In the Early Modern Period, they formed part of the Military Revolution that scholars believe contributed decisively to the formation of the nation state by increasing the expense of maintaining standing armies. Large, permanent barracks were developed in the 18th century by the two dominant states of the period, France the "caserne" and Spain the "cuartel". The English term ‘barrack’, on the other hand, derives from the Spanish word for a temporary shelter erected by soldiers on campaign, barraca; (because of fears that a standing army in barracks would be a threat to the constitution, barracks were not generally built in Great Britain until 1790, on the eve of the Napoleonic Wars).