A nanosecond square pulse fiber laser based on the nonlinear amplifying loop mirror (NALM) is numerically analyzed by the nonlinear Schr ̈odinger equation. The fiber cavity with a NALM has a tendency to provide pulse shaping effect with nonlinearity increasing in the NALM, and the nanosecond square p