Know your onions
To be experienced in or knowledgeable about a subject.
The English grammarian and lexicographer C. T. (Charles Talbut) Onions was an editor of the Oxford English Dictionary from 1895 and continued to write reference works throughout a long and distinguished career. His last work was The Oxford Dictionary of English Etymology, 1966, which was published a year after his death. If I knew as much etymology as he did I could certainly claim to 'know my onions', and it is tempting to assume that this is where the phrase originated.
If the 'onions' referred to in the phrase is indeed human rather than vegetable, there is another Mr. Onions that could be our man. S. G. Onions (they were strong on initials in those days) created sets of coins which were issued to English schools from 1843 onwards. These were teaching aids intended to help children learn £.s.d. (pounds, shillings and pence). They looked similar to real coins and had inscriptions like '4 Farthings make 1 Penny' or, as in the example pictured, '12 Pence make 1 shilling'. We can imagine that 'knowing your Onions' might be coined, so to speak, in those circumstances.
The first known use of 'know your onions' in print, in the 1920s, tends to argue against either of the above men being involved. While it is true that the phrase originated at a time when C. T. Onions had established a reputation, the match between the phrase and his name is just a coincidence. Know your onions is in fact an American phrase. There are many references to it in print there from the 1920s onward, but none in the UK or elsewhere until the middle of the century; for example, this from Harper's Magazine, March 1922:
"Mr. Roberts knows his onions, all right."
Another example comes soon afterwards, in The Lima News, May 1923:
"The Columbus statement declares that the league is ready to give the Donahey boom every aid and comfort. Of course! Why not? Governor Donahey knows his onions..."
Other phrases that refer to knowing - 'know the ropes', 'doesn't know shit from Shinola' etc. allude to specific items as the focus of the knowledge. Other 1920s variants of 'know your onions' are 'know your oil/oats/apples' etc. The only one that caught on and is still in common use is 'know your onions'. So, why onions? Well, as the citation above asks - why not? Explanations that relate the phrase to knowledgeable vegetable gardeners, or even to C. T. or S. G. Onions, are just trying too hard. 1920s America was a breeding ground for wacky phrases (see the bee's knees for some examples) and this is just another of those.
See other phrases that were coined in the USA.