An anti-theft device for computers and the like having a housing with side-walls. The device comprises a block-shaped casing having a front surface, a lock member selectively projectable or withdrawable from the front surface and a key-operated lockable device effective to lock the lock member in the projected position thereof. At least a first hook-shaped projection is provided at the front surface located at one side of the projectable lock member. A cable is fixable to the casing at one end, and to an immovable object at the other end thereof. The first hook-shaped projection is adapted to be inserted into a first opening formed in a side-wall of the housing and then displaced so that the locking device becomes hooked to the housing, in which position the projectable lock member is inserted into an opening formed in the side-wall to prevent the separation of the first projection from the computer housing. A pair of hook shaped projections may be employed.