One of the first things you’ll want to do to a newly installed system is run a fresh software update on it to make sure it’s got all the latest patches since the media it was installed from was created. To do so, you can use the softwareupdate command. To get a list of available updates from the Apple servers (or whichever software update server you may be using):
softwareupdate -list
To install of the available updates:
softwareupdate –all
To install specific updates:
softwareupdate -i <label>