What is the difference between downloading and installing software from AppStore and Terminal
For example, what is the difference between installing software (could be operating system update or any other software) from AppStore or from Terminal using softwareupdate
command. Is there any difference in security, performance, reliability etc?
They command line tool only installs security patches and applications that ship and update only from the core macOS software update servers.
The App Store apps use a different system process to download apps from the App Store from different servers than the system update servers.
Both of the above can be cached locally from caching servers. The graphical Mac App Store app calls both of the processes in an attempt to let people see one interface when there are really several underlying and different processes at work.
- storedownloadd (lives in /System/Library/ProvateFrameworks/CommerceKit)
- storeinstalld (lives in /System/Library/ProvateFrameworks/CommerceKit)
- softwareupdated (lives in /System/Library/CoreServices)
- software update (lives in /usr/sbin)
- installer (lives in /usr/sbin)
- App Store.app (lives in /Applications)
For a quick overview the above programs / tools and daemons (programs that run in the background and are asked to do work from a queue periodically or on demand) are the main players that handle software updates and Mac App Store apps and updates.
A full treatment of how, caching, design, logs would take a nice chapter or two in a book, but hopefully this goes a few layers deeper so you understand why some updates can be scripted (system ones) and which need you to click a button or add a third party app (App Store ones) to be scripted or automated.