How to launch system's "Network diagnostics" from the command line I would like to launch "Network diagnostics" from the command line.
High Sierra and newer OS have moved this to the Applications folder in CoreServices. On new OS - you can use this command.

open /System/Library/CoreServices/Applications/Network\ Utility.app/


If you need to script this for all OS - you'll need to check the version and check if Network Utility is in CoreServices or CoreServices/Applications folder/directory.

Most cases your launch services database is correct and can find the app - be sure you escape / quote the space when calling open -a

open -a "Network Utility"
open -a Network\ Utility
open -a Wireless\ Diagnostics


Same thing if you actually meant Wireless Diagnostics instead of Network Utility since there isn't a Network Diagnostics that ships with macOS.