The invention provides a linear compressor comprising an inner stator and an outer stator which are cylindrical. The outer stator is disposed on the outer side of the inner stator, a flange is arranged at one end of the inner stator, an air cylinder is fixed on the flange, a cylinder body of the air cylinder extends into the inner stator, a piston is arranged in the air cylinder, a stator pressing plate is arranged at the other end of the inner stator, a spring retaining plate is arranged oppositely to the stator pressing plate, a rotor frame connected with the piston is arranged between the inner stator and the outer stator and positioned between the spring retaining plate and the stator pressing plate, the linear compressor further comprises a fixing mechanism, and the fixing mechanism penetrates the rotor frame and the inner stator respectively to fix the spring retaining plate, the stator pressing plate and the flange together. Consequently, needs of the whole linear compressor can be guaranteed, and firmness in fixing of parts which are coaxial can can be guaranteed, so that coaxiality of the linear compressor is guaranteed, and improving of reliability of the linear compressor is facilitated.