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.(Wikipedia)