Slow shell open in OSX Lion

Do you find that opening a new tab in Terminal, or iTerm takes a long time? Maybe 5 to 10 seconds, instead of being nearly instant?

If so, you may want to take a look at Apple’s syslog replacement called ASL.

ASL stores its logs on OSX Lion, under /var/log/asl/.
When Terminal or iTerm open, by default the execute:

login -fp <username>

This (for whatever reason) seems to read all of the log files under that directory. If like me you have 300Mb of rotated log files in there since your last reboot, opening a new shell can take quite a while.

I don’t know what the impact of deleting the files is, but given that they’re log files I deleted the rotated ones anyway. So far, so good! Shells open quickly again!

5 thoughts on “Slow shell open in OSX Lion

  1. Reply
    nosli - August 2, 2012

    Thanks a lot, this was killing me. I had some AppleScrips for starting iTerm and open some tabs with webserver/db/test etc. and they failed just because iTerm was so slow starting a new session. Works like a charm again, so thank you!

    1. Reply
      Av - August 2, 2012

      You’re welcome!

  2. Reply
    David - February 25, 2013

    Perhaps a more permanent way is this (obtained from

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

    For iTerm2: Preperences → General → Command: Change from “Login Shell” to “Command: /bin/bash -l”

    1. Reply
      Mateja - June 20, 2013

      Thanks, works like a charm!

  3. Reply
    JeffH - September 11, 2013

    It’s a while later – but the behavior continues.
    In order to find the place to put the change in iTerm2 look in:
    Preferences -> Profiles -> Command : Change from “Login Shell” to “Command: /bin/bash -l”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top