Skip to content

Finding out OS X information from the command line

I was trying to find out information on what particular version of OS X
I was running from the command line. Being a UNIX type person my first
reaction was to try uname

$ uname -a
Darwin 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power Macintosh powerpc

That gives me the version of Darwin running which I could check up against the
following link
and guess my version of OS X however I was told a better way…

Use a command called sw_vers. Didn’t even know it existed! But
just to show you how it works:

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.3.9
BuildVersion:   7W98

I was also told of another command to get TONS of information from the
command line. system_profiler

$ man system_profiler

system_profiler reports on the hardware and software configuration of the
system. It can generate plain text reports or XML reports which can be
opened with

Be Sociable, Share!