Ulysses contains many references to "barracks," beginning with Buck Mulligan's joke about his soap suds on the first page. As the capital of a subjugated nation with a long history of rebellion, Dublin in 1904 was ringed with military barracks.
It is not clear why, in any realistic sense, Mulligan should bark the command, "Back to barracks!" Gifford suggests that the soap suds are somehow similar to soldiers who, having performed their morning parade, can be dismissed from formation. But these soap suds have not yet performed either of the tasks for which they have been assembled: becoming transformed into the blood of Christ, and shaving Mulligan’s face. In any case, the question of confining soldiers to their barracks, or not, would have been much on Dubliners' minds at this time, when troops were free to roam the streets at night seeking sex and getting involved in brawls.
British soldiers were a fixture on Dublin’s streets, and the city was quite literally encircled by barracks housing large numbers of troops. Joyce makes repeated mention of the "Portobello barracks" in the southern suburb of Rathmines, the home of the two soldiers who assault Stephen in Circe. It accommodated large cavalry units. He also acknowledges the more centrally located "Linenhall barracks," a three-acre complex of buildings erected in the 1720s and enlarged in the 1780s to promote the manufacture and trade of Irish linen. By 1904 that enterprise had been moribund for a century, and the buildings were sometimes used as barracks for British troops.
There were many other such facilities. The Royal Barracks on Benburb Street, on the north bank of the Liffey west of the Four Courts, were the largest in the city. By 1735 they could house five battalions (about 5,000 soldiers), and even more capacity was added as time went on. The Richmond Barracks in Inchicore, on the western edge of the city, could house 1,600 men. Wellington Barracks on the South Circular Road, next to the Grand Canal, was built as a prison in 1813, but it was operating as a barracks by the time of the 1911 census. The Beggars Bush Barracks were located on the southeastern edge of the city, the Aldborough House Barracks on the northeast. The Marlborough Barracks were in Glasnevin, on the northwest edge of the city.
In addition to all these British soldiers, Dubliners enjoyed the constant presence of the Royal Irish Constabulary, which was run along military lines and had a large barracks near the Marlborough Barracks. The constables of the RIC wore military-style uniforms. They were run from Dublin Castle, the center of imperial power in the city, and they had a large depot and magazine in Phoenix Park, not far from the barracks.
More army barracks were scattered throughout the country, many of them within easy reach of Dublin. Along the Military Road, which was built through the Wicklow Mountains in the years after the 1798 Rising in order to deny insurgents hiding places in the hills, five large barracks were constructed during the course of the nineteenth century. Athlone, in the western part of County Westmeath about 75 miles from the capital, had another large garrison.