Youtube-like video stabilization on Linux
To stabilize your video you can use the ffmpeg command line tool.
The easy way: one pass using deshake filter
ffmpeg -i shaky-input.mp4 -vf deshake stabilized-output.mp4

The deshake filter has also some optional settings.
The better way: two passes using vidstab filters
For better results you can try the two-step process using ffmpeg's vidstabdetect and vidstabtransform filters: (Thanks @Mulvya)
ffmpeg -i shaky-input.mp4 -vf vidstabdetect=shakiness=5:show=1 dummy.mp4

This will output a transforms.trf that will be read by the second pass:
ffmpeg -i shaky-input.mp4 -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 stabilized-output.mp4

The vidstab filters documentation explains all the configuration options.