It's like Apple knew people who use the command line and keyboards a lot were going to be upset at the loss of the Escape key.
Open up System Preferences (upper left of the screen, click on the apple, in the dropdown menu that shows, click the "System Preferences" menu option).
Open up the Keyboard Preferences (type "keyboard" in the upper right search box or click the keyboard icon).
Select "F1, F2, etc. Keys" in the "Touch Bar Shows" option.