How do you restart a frozen Mac touch bar?

How do you restart a frozen Mac touch bar?
How to restart the Touch Bar on a Mac

Start the Finder and then search for “terminal.” Double-click Terminal when you see it in the Finder.
In the Terminal window, type sudo pkill TouchBarServer; and press Enter.
You will be asked to enter your administrator password.
Type sudo killall “ControlStrip”; and press Enter.

How to restart the Touch Bar on a Mac
  1. Start the Finder and then search for “terminal.” Double-click Terminal when you see it in the Finder.
  2. In the Terminal window, type sudo pkill TouchBarServer; and press Enter.
  3. You will be asked to enter your administrator password.
  4. Type sudo killall “ControlStrip”; and press Enter.