A lock including a lock cylinder, at least one sensing module and a processing unit is provided. The lock cylinder is adapted for allowing a unlocking unit to insert therein along an inserting direction. The at least one sensing module detects a movement of the lock cylinder. The processing unit electrically connected to the at least one sensing module. The sensing module generates a sensing signal to the processing unit according to the movement of the lock cylinder.