I know that for an ideal gas it can be shown that the average kinetic energy can be written as:
$$\langle K\rangle= \dfrac{1}{2}k_B T.$$
Hence for an ideal gas, temperature can be identified with the average kinetic energy of the particles composing the system.
Now, of course not everything is an ideal gas. There are many other systems we deal in Statistical Mechanics like quantum gases, magnetic materials, and even black holes.
So, in the general case in Statistical Mechanics, is temperature the average of something? If that's true, what is temperature the average of?
EDIT: The point is that temperature is usually defined as
$$T = \dfrac{\partial U}{\partial S},$$
and this doesn't reflect that $T$ is the average of something. So, if $T$ is the average of something, what is this something and how does it connect to this definition?
The main point of the question is that thinking about something as the average of a certain quantity gives us better insight on that something. For instance, in the ideal gas case I presented, it allows us to justify thinking of $T$ as a measure of aggitation of the constituents of the system.
Now, I wanted to understand how we think of $T$ as an average in the general case - both classical and quantum mechanics with arbitrary system.