How Can I Speed Up Terminal.app or iTerm on Mac OSX?

Try deleting the Apple system log files in /var/log/asl/:

sudo rm /var/log/asl/*.asl

This did the trick for me.


Another tip might be helpful:

Change start up shell from default /usr/bin/login to /bin/bash -l, or /usr/bin/zsh if you use zsh.

That might make your Terminal/iTerm2 launch in light speed!

  • For Terminal: Preferences → Startup: Change from "Default login shell" to "Command: /bin/bash -l"

  • For iTerm2: Preferences → Profiles → General → Command: Change from "Login Shell" to "Command: /bin/bash -l"


Am I required a certain reputation to comment on posts? Anyway clearing the system logs did it for me as well, thanks. I have tried to patch path_helper with the patch here: gist.github.com/123525, as suggested in a comment on http://mjtsai.com/blog/2009/04/01/slow-opening-terminal-windows/ (referenced earlier in this thread) but to no avail. I get a cryptic error. However, that patch should speed up terminal.app launch.

addition: As I mentioned, clearing the logs did the trick for me, but the problem continues to emerge as the logs continously grow bigger after I've removed them. I found that "tweaking" /etc/asl.conf has given me a more permanent solution. The modification is to log only messages that are categorised as "critical" or more critical than that, as opposed to logging "notice" category and every more critical than that. Also, I disregard messages from ftp, mail, local0, local1. Here's a paste of my /etc/asl.conf:

 ##
 # configuration file for syslogd and aslmanager
 ##

# redirect com.apple.message.domain to /var/log/DiagnosticMessages
? [T com.apple.message.domain] store_dir /var/log/DiagnosticMessages exclude_asldb

# authpriv messages are root/admin readable
? [= Facility authpriv] access 0 80

# remoteauth critical, alert, and emergency messages are root/admin readable
? [= Facility remoteauth] [<= Level critical] access 0 80

# broadcast emergency messages
? [= Level emergency] broadcast

# save kernel [PID 0] and launchd [PID 1] messages
? [<= PID 1] store

# save everything from emergency to notice
#? [<= Level notice] store
? [<= Level critical] store

# save lpr info level and above
#? [<= Level info] [= Facility lpr] store

# save all mail, ftp, local0, and local1 messages
#? [= Facility mail] store
#? [= Facility ftp] store
#? [= Facility local0] store
#? [= Facility local1] store

From an article I read a couple weeks ago: Slow Opening Terminal Windows

/usr/libexec/path_helper is terribly slow at loading /etc/paths If you remove all the entries in /etc/paths and ensuring that those items are available in your .bash_profile this will resolve the issue. It did for me anyway.