Convert Units With units
Translate between length, mass, temperature and many other units.
Run units "10 miles" "km" to print the converted value.
01Command
Command
$ units "10 miles" "km"02What it does
units understands a large database of physical units and currencies-like ratios, and accepts compound expressions such as 60 mph or m/s^2. Run it with no arguments for interactive mode, or pass both quantities to convert in one shot.
03Risk
!Warning: Unit names are case-sensitive and ambiguous abbreviations can be misread; quote the arguments to keep the shell from splitting them.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- GNU UnitsEvidence: GNU Units converts between thousands of units; the macOS units is a compatible implementation.
Last verified: 2026-09-20 · Category: Developer
06Related solutions
Change where screenshots are saved on Mac
Point macOS screen captures at any folder you choose instead of the desktop.
Download a file from a URL on Mac with curl
Grab any file from the web straight into the current folder — no browser needed.
Find files larger than 500 MB on Mac
List the biggest files in your home folder that are eating disk space.