A single-longitudinal-mode ring thulium/holmium co-doped fiber laser (THDFL) possessing the switchable single-and dual-wavelength outputs is proposed with two subring cavities and two polarization-maintaining fiber Bragg gratings. The switching operation is realized by tuning the pump power and polarization controller together. When the THDFL working at singlewavelength output state, the optical signal-to-noise ratio (OSNR) is ∼51 dB, and the maximum power and wavelength fluctuation within 1 h are 0.804 dB and 0.04 nm, respectively. Using the phase noise analysis-based linewidth measurement system, the linewidth is measured to be 0.16 MHz with a measuring time of 0.002 s. When the THDFL working at dual-wavelength output state, the OSNR is ∼55 dB, and the maximum power and wavelength fluctuation within 1 h are 0.802 dB and 0.05 nm, respectively. The proposed THDFL may find wide applications in microwave photonics generation and optical fiber laser sensor.