I know the question has been asked 4 years ago, several answers have been given, each one tries to solve the problem differently (via GUI or CLI) but none of them is complete.
Yesterday in my company, every macOS user was asked to provide:
a list of all applications installed on their OS X / macOS systems for
a software audit
To make the process consistent, easy and complete, everyone ran the same command in terminal
ls -l /Applications | open -ef && ls -l /usr/local/bin | open -ef
Above command opens 2 files in a default text editor with a list of all installed apps as well as list of all “executables” which should also be considered as applications.
I think that this provides the most comprehensive solution for a given problem. It’s quick and does the job.
To provide more detailed answer let’s finally go through all commands and arguments so that everything is clear to those who are scared with using terminal.
ls command simply lists directory contents. In this case
/Applications as well as
/usr/local/bin - this location is for programs that a normal user may run.
-l displays the list in a “long format”. More about “long format" can be found here.
Next we have a pipe symbol
|. It separates two programs on a command line so that listed output can be next opened in another program. In this case using
open command simply opens files and directories but combined with
-e Causes the file to be opened with
-f Reads input from standard input and opens the results in the default text editor.
Finally combination of both lists is glued together with
&& which allows to execute multiple commands at once so finally we end up with a "one line" terminal command.
Hope this helps and provides detailed explanation.