Skip to content

units MacOS Command Guide

The units command on MacOS allows users to quickly and easily convert between different units of measurement. Whether you need to convert inches to centimeters, miles to kilometers, or even units of currency, this command can handle it all. By simply entering the desired conversion in the terminal, the units command will provide you with the accurate conversion result. This can be extremely handy for anyone who frequently works with various units of measurement and needs a quick and reliable way to convert between them. Give the units command a try on your MacOS system and streamline your unit conversion tasks today.

Terminal window
units [-f unitsfile] [-q] [from-unit [to-unit]]
OptionDescription
-f unitsfileSpecifies a file containing unit definitions.
-qQuiet mode; suppresses informational messages.
ParameterDescription
from-unitSpecifies the unit of measurement to convert from.
to-unitSpecifies the unit of measurement to convert to.
Terminal window
units '100in' 'cm'

This command will convert 100 inches to centimeters.

Terminal window
units '2.5lb' 'kg'

Converts 2.5 pounds to kilograms using the units command.

Perform temperature conversion from Fahrenheit to Celsius

Section titled “Perform temperature conversion from Fahrenheit to Celsius”
Terminal window
units '72F' 'C'

Runs a temperature conversion from Fahrenheit to Celsius with the units tool.

Terminal window
units '5000m' 'km'

Utilizes the units command for converting 5000 meters to kilometers.

Conduct currency conversion from USD to EUR

Section titled “Conduct currency conversion from USD to EUR”
Terminal window
units '$100' 'EUR'

Executes a currency conversion from USD to EUR using the units utility.

Calculate 30 miles per hour in kilometers per hour

Section titled “Calculate 30 miles per hour in kilometers per hour”
Terminal window
units '30mph' 'kmph'

Calculates 30 miles per hour in kilometers per hour using the units command.

Terminal window
units '1l' 'floz'

Uses the units tool to convert 1 liter to fluid ounces.

To use the units command in MacOS, execute the following command:

Terminal window
units --convert 10 cm inch

How can I perform currency conversions with the units command in MacOS?

Section titled “How can I perform currency conversions with the units command in MacOS?”

To perform currency conversions using the units command in MacOS, use the following syntax:

Terminal window
units --currency 100 USD EUR

How do I list available units for conversion in the MacOS units command?

Section titled “How do I list available units for conversion in the MacOS units command?”

To list the available units that can be used for conversion in the units command in MacOS, run the following command:

Terminal window
units -l

How can I perform unit conversions interactively using the units command in MacOS?

Section titled “How can I perform unit conversions interactively using the units command in MacOS?”

To perform unit conversions interactively with the units command in MacOS, simply enter the command “units” and follow the prompt to specify the conversion units.

Can I specify custom units for conversion in the MacOS units command?

Section titled “Can I specify custom units for conversion in the MacOS units command?”

Yes, you can specify custom units for conversion in the units command in MacOS. Use the following command syntax:

Terminal window
units 'customunit1' 'customunit2'

How do I perform temperature conversions with the units command in MacOS?

Section titled “How do I perform temperature conversions with the units command in MacOS?”

To perform temperature conversions using the units command in MacOS, use the following command structure:

Terminal window
units --convert 32F C
  • Converting between different units of measurement
  • Performing mathematical operations with units
  • Learning the relationships and conversions between various units