I guess I've only heard it used to refer to lawyers. Is the term exclusive to lawyers?
No, it's not restricted to lawyers:
hang out one's shingle
Open an office, especially a professional practice, as in Bill's renting that office and hanging out his shingle next month. This American colloquialism dates from the first half of the 1800s, when at first lawyers, and later also doctors and business concerns, used shingles for signboards.
[The American Heritage Dictionary of Idioms by Christine Ammer. S.v. "hang out one's shingle." Retrieved February 8 2016 from http://idioms.thefreedictionary.com/hang+out+one%27s+shingle ]
With respect to the etymology of the phrase, the earliest use I could find with reference to 'hang a shingle' was this from a letter dated January 20, 1830, in The Constellation (also known as the New York Constellation and the Constellation Advertiser), subsequently picked up and republished in the Indiana Palladium, 9 April 1831:
Dear Tim, In my last letter, I told you I'de managed to keep out of jail, tho' one feller tried plaga hard to put me in. I guess I was a lawer enuff to cast him twice, tho' he was a lawer too and a pretty slippery one into the bargin. The first time he spelt my name in the writ Timbletoes, and I upset him there, cause it was no name of mine. The next time he want on the spot and the justas faulted him--so you see I've half a mind to stick up a shingle as turney at law, if there want so plagy many of them here already--they're as thick as flies round a bunghole.
An earlier published instance with reference to writing on a shingle was the following in The Genius of Liberty, 21 February 1829 (Leesburg, Virginia), which was also picked up from a New York paper (unnamed):
Anti-Tariff Bagging.—On board the ship Othello, from Charleston, one of the bales of cotton has a wrapper of what is termed “anti-tariff bagging,” which we understand is manufactured from white-oak splits, we are told also that it was accompanied with a letter of advice written on a shingle! —[N. York paper
A somewhat later publication describing writing on a shingle was this (again) from The Genius of Liberty, 17 November 1832:
The Yankees knew the way to the West Indies a good while ago; they knew more ways than one.—Their coasting vessels knew the way, without quadrant or Practical Navigator. Their skippers kept their reckoning with chalk, on a shingle, which they stowed away in the binnacle; and by way of observation, they held up a hand to the sun.—When they got him over four fingers, they knew they were straight for the Hole-in-the-wall; three fingers gave them their course to the Double-headed-shot-keys, and two carried them down to Barbadoes.
Then, in another, later edition of The Genius of Liberty (28 February 1835), this note can be observed:
The editor of an anti-masonic paper at Harrisburg, Pa. having been expelled his seat in the house of representatives of that state, as reporter, is now taking notes on a shingle, it is said, in one of the galleries.
All together, these occurrences referring to writing on shingles as signage on a bale of cotton (1829), a "lawer's" place-of-business advertisement (1830), and a handy 'slate' for making notes (1832, 1835) tempt the conclusion that shingles were a cheap and ready substitute for more conventional writing surfaces in the early 1800s. The practice of lawyers using shingles to advertise their workplaces was the natural outgrowth of shingles' broader, more general application as signage and 'writing slate'.
Thus, it would be justifiable to suppose that shingles were, early on, used for signage at places of business, regardless of the type of business. To 'hang out a shingle' was equivalent to 'placing a sign'. Additionally, instances of the phrase in early publications invariably specified the exact use of the shingle or, if a place of business was so announced, the type of business that employed the shingle. This broad use of the phrase is further documented in Sven's most excellent answer, with published instances from 1834, 1839, 1843 and 1845.
The earliest Google Books match appears to be from "My Hobby,—rather" in The New Monthly Magazine (November 1834)—and it does involve a lawyer:
Larry Wynn (now Lawrence Wynn, Esq.) lived here. He had, as they say in the United States, "hung out a shingle" (Londonicé, put up a sign) as attorney-at-law ; and to all the twenty thousand innocent inhabitants of the place, he was the oracle and the squire.
It also turns up in this item from the Maumee City [Ohio] Express (October 19, 1839):
A QUEER CHAP.—The Iowa Patriot relates an anecdote of the late Rev. Mr. Scott, an eccentric preacher in that neighborhood, who ws formerly lawyer in Arkansas, to this effect.‚When he first hung out his shingle, he inscribed on it:
A. M Scott, Attorney at law,
The tallest man in Arkansaw.
But John Bartlett, Dictionary of Americanisms (1848) shows the term already being applied to other occupations as well—and indeed to signboard notices of any kind:
SHINGLE. A jocose term for a sign-board, placed over a shop-door or office.
Doctors and dentists from the United States have stuck up their shingles in Mexico.—N.Y. Com[mercial] Adv[ertiser], Dec. 24, 1848
Several made bold to peep inside, in spite of the "No Admittance!" which frowned from a shingle over the door.—Drama at Pokerville.
An item in the Edgefield [South Carolina] Advertiser (September 20, 1843) shows it being used in connection with a physician's office:
An Irish laborer who had been employed on the aqueduct, and lost his health, whether from hard work and the miasmata of the swamps on the upper part of the Island, or devotion to the bottle, we are not informed, applied for advice to a tolerably well known surgeon and physician, who hangs out a shingle in a very respectable street in this good city.
And an item in the [Ravenna, Ohio] Portage Sentinel (December 24, 1845) shows it being used in connection with a "public dwelling house":
A man down south lately built a house of logs and turf, hung out his "shingle," and sent the following advertisement to the village paper:
"Notice to travellers—sign of the 'Pig and Tater.' Having built a large condition to my public dwelling house, I am prepared to contain travellers in a more hostile manner than dad, or Mr. Carter either. Call and try me. Do gentlemen."
An Ngram chart of "hung out a shingle" (blue line) versus "hang out a shingle" (red line) versus "hung a shingle" (green line) versus "hang a shingle" (yellow line) indicates that "hang out/hung out a shingle" is a somewhat older form than "hang/hung a shingle," and that it remains somewhat more popular today:
However, additional variants on the same idea (such as the 1848 instance of "stuck up their shingles" cited by Bartlett) exist and clearly have been around for a long time.
Maximilian Schele de Vere, Americanisms: The English of the New World (1872) suggests that the expression may have arisen at a time when or in a place where shingles were the standard medium for signage:
Shingle, in America a wooden tile, and also familiarly used for a modest signboard, placed over an office, since, in the West especially, a real shingle has often to answer the purpose.
Having said all that, I should note that the connection between "hang out a shingle" and lawyers remains particularly strong. Thus, for example, from Edith Shillue, Peace Comes Dropping Slow: Conversations in Northern Ireland (2003):
His [law] firm was relatively new, and as he was really the "and Co." of of "R. P Crawford and Co.," I felt I should show him some support. Robbie's decision to "hang out a shingle" (which is our American slang for going it alone in the legal business) instead of staying with larger firms brought a smile to my face. My father was a lawyer who had hung out a shingle.
It may be that the persistence of this idiom in connection with the legal profession is tied to the fact that for many years (in the United States) lawyers were forbidden by law and/or by state bar rules from advertising their services. As a result, the shingle was one of the few acceptable ways of notifying the public of one's availability to provide legal services. This was especially a problem for lawyers setting out on their own practice, rather than joining an established firm.
Hang out one's shingle was originally used especially for lawyers, but is now applied to any kind of profession:
Open an office, especially a professional practice, as in Bill's renting that office and hanging out his shingle next month.
This American colloquialism dates from the first half of the 1800s, when at first lawyers, and later also doctors and business concerns, used shingles for signboards.
(The American Heritage® Idioms Dictionary)
- “Hanging out one’s shingle” is an American idiom dating back to the early 1800’s, when lawyers, doctors, and other businesses used shingles for signboards. When you walk along a sidewalk in a downtown area, you can often see little signs in front of businesses, hanging above the sidewalk.