A linear cavity Q-switched fiber based laser is designed and demonstrated experimentally. The Q-switching technique is based on dynamic spectral overlap between a modulated fiber Fabry-Perot tunable filter and a fiber Bragg grating. To characterize the Q-switched fiber laser performance, a 3m length of Erbium doped fiber was used. Fiber laser parameters such as output coupling ratio, pump power and modulation frequency were optimized to obtain a laser output of 5.6W peak power with a 450ns pulse width and a 1 kHz repetition rate. Using the optimized fiber laser cavity design, the extinction ratio of the fiber laser up to 36 dB was achieved. This Q-switching technique for achieving laser pulses maintains the intrinsic robustness and simplicity of an all fiber laser system.