The 16th century saw the Portuguese set up base in India. The story goes that, while they were familiar with the Moors/Mahomedans, they were not acquainted with the Hindus that populated the western shores of India at the time. Therefore, these Hindus were simply dubbed 'gentios', a Portuguese word meaning heathen (sharing the same root as the word gentile), commonly used to clump together all peoples non-Christian. Over time, this word is said to have degraded to 'gentoo' and was also used by other Europeans who rushed in to get their piece of the Indian cake.
In 1776, Warren Hastings, the first governor-general of India, commissioned the translation of a Hindu code of laws named Vivādārṇavasetu. Since the Sanskrit-grokking Brahmins could not translate directly to English, and the English-grokking grammarians could not translate from Sanskrit, Persian was used as an intermediate. The Indian scholars translated the pandect--which was based on the Dharmashastra--into Persian, and an Englishman by the name of Nathaniel Brassey Halhed, translated the translation into English. The finished work was dubbed, 'The Gentoo Code'.
The Falkland Islands/Islas Malvinas, located off the coast of Argentina in South America, is home to a number of migratory Antarctic penguins. In 1781, James Cook, on the second of his legendary voyages, arrived at these islands. On his crew was an early version of an ornithologist in Johann Reinhold Forster, who noticed a peculiar species of penguin characterised by a wide white stripe resembling a cap on the top of its head. This particular characteristic, apparently reminiscent of the headgear worn by the Gentoos of India, led to it, Pygoscelis papua, being named the 'Gentoo penguin'.
The Gentoo penguin is also reputed to be the fastest swimming penguin species. This made 'Gentoo' the perfect name for a distribution of the Linux operating system (which has a penguin as its logo). Gentoo Linux is widely considered to be one of the most flexible and customisable mainstream Linux 'distro' available today.