To answer your last question first, tuners pretty much do this. So a tuner VST may help. I have not tried it, especially on inharmonic sounds.
Here's a definition (Wikipedia):
The fundamental frequency, often referred to simply as the fundamental, is defined as the lowest frequency of a periodic waveform. [...] In terms of a superposition of sinusoids (e.g. Fourier series), the fundamental frequency is the lowest frequency sinusoidal in the sum.
So, in general, you want to take the Fourier transform of the sound, and find the lowest peak. Spectrum analysers do the transform bit (ignoring some complexity around bin sizes), so I guess you could just look for the peak. You'll have to distinguish it from the noise floor, or any other artifacts, of course.
As E.P. notes in the comments, this won't work for an arbitrary waveform. Specifically, if it's not periodic, the concept of a fundamental frequency doesn't really make sense any more. Even if it is periodic, there's the concept of the missing fundamental. The Wikipedia article mentions that this is intentionally used in music to imply lower bass frequencies that are not otherwise reproducible. In these cases, you're probably going to have to do some more analysis of the specific waveform. I'm not aware of an algorithm that can perform this automatically.
You could probably build a tuner using this technique, but I'm not sure if "real" ones are actually implemented this way. A very cursory Google revealed that there are other techniques which do not require an FFT, which are probably more attractive to your average guitar tuner.
This Stack Overflow answer may be of interest: https://stackoverflow.com/questions/435533/detecting-the-fundamental-frequency