A fluid pressure cylinder comprising: a cylinder tube including a slide hole inside the cylinder tube; a piston unit disposed to be reciprocable along the slide hole; and a piston rod protruding from the piston unit in an axial direction, wherein the piston unit includes: a piston body protruding radially outward from the piston rod; a packing attached to an outer circumferential part of the piston body; a holding member attached to the outer circumferential part of the piston body and including a magnet holding portion; and a magnet held by the magnet holding portion and disposed partially in a circumferential direction of the piston body, and wherein the magnet holding portion has a cavity (58a1) opened in an outer circumferential surface of the holding member, wherein the holding member includes a circumferential portion extending in the circumferential direction along the outer circumferential part of the piston body; an inner circumferential surface of the circumferential portion is attached to the outer circumferential part of the piston body; the cavity (58a1) is opened in an outer circumferential surface of the circumferential portion, characterized in that the magnet holding portion protrudes inward from the inner circumferential surface of the circumferential portion attached to the outer circumferential part of the piston body. a cylinder tube including a slide hole inside the cylinder tube; a piston unit disposed to be reciprocable along the slide hole; and a piston rod protruding from the piston unit in an axial direction, wherein the piston unit includes: a piston body protruding radially outward from the piston rod; a packing attached to an outer circumferential part of the piston body; a holding member attached to the outer circumferential part of the piston body and including a magnet holding portion; and a magnet held by the magnet holding portion and disposed partially in a circumferential direction of the piston body, and wherein the magnet holding portion has a cavity (58a1) opened in an outer circumferential surface of the holding member, wherein the holding member includes a circumferential portion extending in the circumferential direction along the outer circumferential part of the piston body; an inner circumferential surface of the circumferential portion is attached to the outer circumferential part of the piston body; the cavity (58a1) is opened in an outer circumferential surface of the circumferential portion, characterized in that the magnet holding portion protrudes inward from the inner circumferential surface of the circumferential portion attached to the outer circumferential part of the piston body. a piston body protruding radially outward from the piston rod; a packing attached to an outer circumferential part of the piston body; a holding member attached to the outer circumferential part of the piston body and including a magnet holding portion; and a magnet held by the magnet holding portion and disposed partially in a circumferential direction of the piston body, and wherein the magnet holding portion has a cavity (58a1) opened in an outer circumferential surface of the holding member, wherein the holding member includes a circumferential portion extending in the circumferential direction along the outer circumferential part of the piston body; an inner circumferential surface of the circumferential portion is attached to the outer circumferential part of the piston body; the cavity (58a1) is opened in an outer circumferential surface of the circumferential portion, characterized in that the magnet holding portion protrudes inward from the inner circumferential surface of the circumferential portion attached to the outer circumferential part of the piston body.