Dude
late 19th century (denoting a dandy): probably shortened from doodle, perhaps with allusion to Yankee Doodle Dandy.
wiktionary
Origin uncertain, though likely derived from doodle(“ fool, simpleton, mindless person”), perhaps with reference to the fashionable “Yankee Doodle dandy” in the 18th-century lyrics of the song “ Yankee Doodle”; [1] the word is first attested in 1883 [2] [3] as a New York City slang term of contempt for a “fastidious man, fop”. [4]
It has also been suggested that the word is derived from dudes (“old rags”; compare duds) and dudesman(“ scarecrow”), [5] or possibly related to dawdle; to German Low German Dudeldop, Dudendop(“fool, dunce”), from Middle Low German dudendop(“ cuckold; simpleton”); or to Saterland Frisian Duddigegen(“ idiot”). It has also been suggested the word derives from the Irish dúid.
The common claim that the term derives from (or is) a word for a camel's foreskin (or some other vulgar thing, like a hair on a cow, horse, donkey, or elephant's bottom) is false.
etymonline
dude (n.)
1883, "fastidious man," New York City slang of unknown origin; recent research suggests it is a shortening of Yankee Doodle, based on the song's notion of "foppish, over-fastidious male" (compare macaroni). The vogue word of 1883, originally used in reference to the devotees of the "aesthetic" craze, later applied to city slickers, especially Easterners vacationing in the West (as in dude ranch "ranch which entertains guests and tourists for pay," attested by 1921). "The term has no antecedent record, and is prob. merely one of the spontaneous products of popular slang" [Century Dictionary].
Now, "tenderfoot" is not to be construed as the Western equivalent of that much evolved and more abused specimen of mankind, familiarly styled "dude." For even the Montana cowboy recognizes the latter. Not that he has ever seen the true prototype of a class that was erstwhile so numerous among us. But he is convinced that a person caught in the act of wearing a white linen collar, and who looks as though he might have recently shaved or washed his face, must be a dude, true and proper. ["Random Notes and Observations of a Trip through the Great Northwest," The Medical Record, Oct. 20, 1883]
Application to any male is recorded by 1966, U.S., originally in African-American vernacular.