MacOS – Terminal window title rapidly changes when first opening

bashcommand linemacosterminal

When I open a fresh terminal window, the title at the top has this format:
[house icon][username]-[command]-[terminal size]

The command portion of the title initially says login, then it very quickly rotates through other commands like ps, awk, grep, cat, sed, dirname, then eventually resolves to bash. The title switching happens so fast that I can barely read the words. I'm on OSX 10.9.4 but I believe this used to happen on slightly older versions.

I checked out the history to see if it might be that, but it's not. It doesn't seem to affect anything besides possibly starting the terminal a second or two slower. Why does this happen and is there a way to fix it?

Best Answer

The commands shown in the title indicate that something is being run. This is likely to be in a sourced file such as…

  • ~/.bash_profile
  • ~/.profile
  • /etc/profile
  • ~/.bash_login
  • ~/.bashrc (although this is not sourced automatically)

Check the files that your shell is sourcing for the commands that are being run and comment them out or remove them if necessary.