I guess it was really just a matter of time until it happened, but thanks to PlanetBeing, an industrious member of the iPhone Dev Team, Linux is running on an iPhone.
The port is of the Linux 2.6 kernel and can run on first and second generation iPhones as well as the first generation iPod touch. PlanetBeing details his Linux port on his blog, making sure to note that the Linux project is separate from the iPhone Dev Team project.
Currently the Linux port is fairly incomplete. The framebuffer driver, serial driver, serial over USB driver, and drivers for interrupts and other miscellaneous components have been successfully ported over. Read-only support for the NAND memory is coming along also, but there are a number of components still not running, including write-support for NAND memory, baseband chip support, and support for many iPhone features such as the touch screen, accelerometer, sound, and wireless networking.
Currently the port is possible through the iPhone attached to a computer with USB keyboard so it isn't a fully portable Linux port yet. Hopefully future updates will find a way to use a touch pad keyboard. But even in an incomplete state, it is very promising to see a version of Linux running on iPhone, and an indication that a more complete port will be coming in the future.
But it looks like PlanetBeing isn't just thinking of running Linux on iPhones. On his blog he also says that he is interested in working with people experienced with Google's Android OS. Might this be an indication that we could have the Android OS running on our iPhones in the future? It sure looks that way. Though I doubt Google will do this, maybe it should get working on an official Android port before some very skilled hackers beat them to it.