Using a Mac Equivalent of Unix “tree” Command to View Folder Trees at Terminal

Mac users who come from a unix background may appreciate knowing how to implement the equivalent to the Unix “tree” command in macOS and Mac OS X. There are actually a few different ways to show a folder tree in the Terminal of Mac OS X, we’ll cover an easy tree equivalent achieved through an alias, as well as how to install native ‘tree’ on a Mac just like what you see in Ubuntu or elsewhere in Linux.
This is obviously aimed at command line users, but if you spend more time in the Finder of the Mac you might appreciate listing files and folder contents recursively there, which can be similar but is obviously not displaying a directory tree at the Terminal.
















