Based on highly Er/Yb codoped phosphate fibers, we have implemented all-fiber-based narrow-linewidth single-mode (SM) pulsed fiber lasers in master oscillator and power amplifier configuration. Two approaches were used to achieve the narrow-linewidth pulsed fiber laser seeds: 1) an all-fiber-based active $Q$ -switched fiber laser using an actuator and 2) a directly modulated single-frequency continuous-wave fiber laser. Both the fiber laser seed pulses from the two approaches have the transform-limited spectral linewidth. Based on a newly developed large-core SM highly Er/Yb codoped phosphate fiber, the peak power of SM pulses can be scaled to more than 50 kW with transform-limited linewidth and diffraction-limited beam quality. These high-power narrow-linewidth SM fiber laser pulses have been successfully used to generate coherent terahertz (THz) waves based on parametric processes in a nonlinear optical crystal. The peak power of this fiber-based THz source can reach 26.4 mW.