I use the "launchctl setenv" command to set shell environment variables used by launchd launch daemons.
The man pages "man launchctl" say that "launchctl export" will show all variables used by launchd:
export Export all of the environment variables of launchd for use in a
shell eval statement.
But "sudo launchctl export" throws an error":
Unrecognized subcommand: export
What commnd shows all shell environment variables set and used by launchd launch daemonds?
This is on macOS 10.14.6.