In this work, a single and dual-wavelength erbium-doped fiber laser (EDFL) based on two Mach-Zehnder interferometers (MZIs) in cascade structure was experimentally validated. MZIs were assembled by joining a capillary hollow-core fiber (CHCF) piece between two multimode fibers (MMFs) sections. The switchable operation is reached by moving the spectrum of one MZI when the temperature is increased. The maximum measured signal noise to ratio (SNR) was more than 50 dB for the single and dual-wavelength laser lines. Besides, stable output is shown since no power and wavelength variations were noticed. It is important to mention that emissions are obtained at precise wavelength positions and not arbitrarily as described by other investigations. This EDFL can be used in applications of optical fiber communications systems and fiber sensing.