Terminal 101: Software Update
Posted 03/12/2012 at 8:14am
| by Cory Bohon
Every Monday, we'll show you how to do something new and simple with Apple's built-in command line application. You don't need any fancy software, or a knowledge of coding to do any of these. All you need is a keyboard to type 'em out!
Keeping your software up-to-date ensures that you Mac has the latest security updates and most recent features. Usually we rely on the Software Update icon to start bouncing up and down in the dock before we do anything about it, but if you have multiple Macs this kind of infrequent update process can be a pain. With a simple Terminal command, however, you can “set it and forget it” when it comes to installing new updates. And if you set up SSH on your Mac, you can even log in and install new updates remotely. Like magic!
Check for Updates
To check for and install all of the latest software updates for your Mac, open Terminal and type the following command:
sudo softwareupdate -ia
Because softwareupdate is a command requiring administrator privileges, we need to use the sudo prefix and type in the administrator password before the Software Update Tool can be run.

If a software update is available, this command will cause the tool to automatically download and install the software updates. Otherwise, a “Done” statement will be displayed, and control will return to Terminal.

As the software updates are downloaded and installed, you will prompted throughout the entire process. Easy as pie! Eating a pie, that is.
Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article's author, Cory Bohon on Twitter.