Set an audio or visual alert in Terminal on Mac
Some messages and commands produce an alert in Terminal. You can select a visual alert that makes the Terminal window blink, or an audible alert that makes a sound.
In the Terminal app on your Mac, choose Terminal > Settings, then click Profiles.
In the profiles list on the left, select a profile.
Below Bell, select the type of alert you want.