In the 21st century, the term "dude" is just another word for "guy" or "man." I first became aware of the word "dude" in Western movies, when it referred to a newcomer unfamiliar with or incapable of Wild West ways, also called a city slicker. That definition fits in well with the history of the word, which goes back further than you might think. The first appearance of "dude" in print happened in 1883, when it appeared in a poem. But we know that people were saying something long before it ever got to print. The etymology of the word between its origin and the first evidence in print is the subject of some speculation.
One theory that makes sense, but it still surprising, is that "dude" derived from the earlier term "Yankee Doodle Dandy!" It works in the context of the earliest definition of "dude." But the meaning behind the word changed through the 20th century. Read the history of the slang term that went from an insult to a descriptor to a worse insult to a compliment to neutral everyday use at The Art of Manliness. -Thanks WTM!