How to convert video to animated gif image on Linux

Once thought of as outdated art forms, animated GIF images have now come back. If you haven’t noticed, quite a few online sharing and social networking sites are now supporting animated GIF images, for example, on Tumblr, Flickr, Google+, and partly on Facebook. Due to their ease of consumption and sharing, GIF-ed animations are now part of mainstream Internet culture. This tutorial describes how to convert a video file to an animated GIF image on Linux.