a linear actuator includes a housing formed of a first half shell and a second half shell and defining an accommodation chamber , a front opening in front of the accommodation chamber and a receiving chamber at the bottom side of the accommodation chamber , a driving mechanism having a push rod movably mounted in the accommodation chamber and extending out of the front opening , a motor mounted outside the accommodation chamber and a spindle coupled to and rotatable by the motor for causing the transmission shaft to reciprocate , and limit switches detachably mounted in the receiving chamber for stopping the motor upon movement of the transmission shaft to a front or rear limit position .