What is the basic condition for the motion of a particle to be S.H.M.?

The necessary and sufficient condition for motion to be simple harmonic is that the restoring force must be linear