gnu units: units converts quantities between different scales
units is a command-line tool which performs units conversion between various scales. units is the perfect tool for engineer or scientific workstation, you can call it either interactively from the prompt or within command line. It already handles more than two thousand units and this can be enhanced with your own units in a separate data file.
units handles multiplicative scales factor as well as non-linear conversions units such as Celsius Fahrenheit. Compound units are also allowed in order to deal with quantities such as speed, volume, energy, etc.
Calling units without any option will run it interactively. Here is an example showing how to convert cm3 to gallons: