A linear compressor, comprising: a compressor body; and a shell that accommodates the compressor body, wherein the compressor body includes: a frame including: a frame body that extends in a first direction; a frame head that extends from a front end of the frame body in a second direction perpendicular to the first direction; a flange groove defined in the frame head ; and a body hole that passes through the frame body to communicate with the flange groove ; a cylinder including: a cylinder body configured to be inserted into the body hole ; a cylinder flange having an outer diameter greater than an outer diameter of the cylinder body and protruding from an outer circumferential surface of the cylinder body ; and characterised by a cylinder head provided on a front end of the cylinder flange and having an outer diameter less than an outer diameter of the cylinder flange ; and a lock ring press-fitted into the flange groove and provided in a space defined between the cylinder head and an inner circumferential surface of the flange groove . a compressor body; and a shell that accommodates the compressor body, wherein the compressor body includes: a frame including: a frame body that extends in a first direction; a frame head that extends from a front end of the frame body in a second direction perpendicular to the first direction; a flange groove defined in the frame head ; and a body hole that passes through the frame body to communicate with the flange groove ; a cylinder including: a cylinder body configured to be inserted into the body hole ; a cylinder flange having an outer diameter greater than an outer diameter of the cylinder body and protruding from an outer circumferential surface of the cylinder body ; and characterised by a cylinder head provided on a front end of the cylinder flange and having an outer diameter less than an outer diameter of the cylinder flange ; and a lock ring press-fitted into the flange groove and provided in a space defined between the cylinder head and an inner circumferential surface of the flange groove . a frame including: a frame body that extends in a first direction; a frame head that extends from a front end of the frame body in a second direction perpendicular to the first direction; a flange groove defined in the frame head ; and a body hole that passes through the frame body to communicate with the flange groove ; a frame body that extends in a first direction; a frame head that extends from a front end of the frame body in a second direction perpendicular to the first direction; a flange groove defined in the frame head ; and a body hole that passes through the frame body to communicate with the flange groove ; a cylinder including: a cylinder body configured to be inserted into the body hole ; a cylinder flange having an outer diameter greater than an outer diameter of the cylinder body and protruding from an outer circumferential surface of the cylinder body ; and characterised by a cylinder head provided on a front end of the cylinder flange and having an outer diameter less than an outer diameter of the cylinder flange ; and a cylinder body configured to be inserted into the body hole ; a cylinder flange having an outer diameter greater than an outer diameter of the cylinder body and protruding from an outer circumferential surface of the cylinder body ; and characterised by a cylinder head provided on a front end of the cylinder flange and having an outer diameter less than an outer diameter of the cylinder flange ; and a lock ring press-fitted into the flange groove and provided in a space defined between the cylinder head and an inner circumferential surface of the flange groove . <EOS>