Change the title shown in a Terminal window on Mac
You can change the text in the title bar of a Terminal window to display information about the window’s configuration.
In the Terminal app on your Mac, choose Terminal > Settings, then click Profiles.
In the Profiles list, select a profile.
Below Title, enter the name you want to appear in the title bar.
Select the items you want to appear in the title bar.
Working directory or document: The working directory or document name. Click Path to display this information as a path.
Active process name: The currently running process.
Shell command name: The shell being used in the window.
Profile name: The settings being used to configure the window.
TTY name: The current name of the terminal. The name is equivalent to the result of the tty command in UNIX.
Dimensions: The number of columns and rows in the window.
Command key: The command key you use to switch to the window.