It would be easier to give an answer if we knew what you want to use this for. That would give an idea of your requirements in terms of speed, cost, and space requirements.
As Rocketmagnet has pointed out, you can use a belt drive, or long pitch screw. And you have already mentioned a rack and pinion system. These are all involve a conventional (DC) motor along with a mechanical system to convert angular motion into linear motion:
Other methods include:
Linear motor - This is quite cool, it involves a line of magnetic poles, which accelerate the rotor in a linear direction. These can be very fast and precise! This can also be controlled in open-loop (like a stepper motor).
Above is a cross-section of a linear motor
- Pneumatic cylinder - the speed can be controlled using a control valve, pneumatic actuators are also quite popular for robotics applications because of its compliance.
- Hydraulic cylinder
Wikipedia has an article on linear actuators, and also a comparison table with advantages and disadvantages!