macOS software update from Terminal
macOS can update system software from Terminal, even macOS itself. However, to complete the upgrade requires using the graphical desktop, perhaps over VNC.
softwareupdate -l
shows the available updates.
softwareupdate -i -a
installs all available updates.