How long do earthquakes last?
Generally, most earthquakes last only few seconds. The larger the quake, the longer it may last. Quakes around magnitudes 5-6 often last up to 30 seconds. The very largest quakes can produce shaking that lasts several minutes, but these are fortunately extremely rare.
Aftershocks often continue for many weeks, months or even years after larger earthquakes. During extreme earthquakes (magnitude 8+), aftershocks are so common and frequent in the hours following the quake, that they produce a near-continuous shaking on the surface near the epicenter.
Actually, there are two ways to speak about the duration of an earthquake. The above refers to the shaking perceived on the ground and is what most people are interested in. A second, more scientific definition of duration would the time it takes the underground fault to rupture along its affected surface during the quake. It starts to break at a point and then the rupture propagates along the fault surface at a velocity of approx. 2 kilometers per second. This will give a much shorter value as at this speed, even distances of several 100 km for magnitude 8-9 quakes are covered in typically less than a minute. However, shaking or ground vibration lasts longer, such as waves on a water surface hit by a stone continue for some time even after the stone has sunken under the water.
The shaking induced by the rupture along the fault line is propagating from all points along this fault surface radially in all directions and hits the ground in a complex pattern.