The softwareupdate command is a system software update tool. The man description is “Software Update checks for new and updated versions of your software based on information about your computer and current software.”
Basically it allows you to perform macOS system updates from the command line instead of updating via the GUI System Preferences.
Typing softwareupdate on the command line with no options will give you a printout of the basic command usage. For more detailed information and syntax examples type man softwareupdate.
softwareupdate
man softwareupdate
To list the available updates type softwareupdate and use the -l or –list option.
softwareupdate -l
The command I use most frequently is the -i or –install; combined with -a or -all. This will install all available updates available.
softwareupdate -ia