An aerostatic bearing and a linear compressor that includes the aerostatic bearing. In an exemplary embodiment, the aerostatic bearing includes a guide element including holes, and a body structured to move along a surface of the guide element. The holes may include a first section close to the body, of which at least one part area features a cross-sectional surface substantially constant over its entire length which is smaller towards the body than another cross-sectional surface of an area away from the body. A method for producing a hole in an element, using a laser beam, for producing the aerostatic bearing is also disclosed.