Written in 1971 by Robert Thomas while he was a programmer for BBN (Bold, Beranek and Newman, which became Raytheon of today), the first computer virus was called Creeper and was designed without malicious intent to experiment with self-replicating software on the TENEX operating system.
However, Creeper didn't actually manage to replicate itself. Instead, after behavior such as starting to print a file and then stopping or displaying a message that read: "I'm the Creeper: Catch me if you can," the virus would remove itself from the machine as it traveled onward to the next TENEX system.
In 1972, Ray Tomlinson wrote "Reaper," which was designed to copy itself and move across the ARPANET, deleting Creeper along the way.
Incidentally, the Creeper virus was named after a villain from the original Scooby Doo cartoons.