10

Fixing a slow starting Terminal or iTerm2 on Mac OS X

 3 years ago
source link: https://www.devroom.io/2011/11/08/fixing-a-slow-starting-terminal-or-iterm2-on-mac-os-x/?utm_campaign=Feed%3A+ariejan+%28ariejan%7Cdevroom.io%29
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Fixing a slow starting Terminal or iTerm2 on Mac OS X

Posted: 2011-11-08 - Last updated: 2019-06-05

Tagged bash shell macosx devops terminal terminal.app iterm iterm2 zsh

For some time I have been annoyed with how slow my Terminal (in my case iTerm2) starts up. It would take 5-10 seconds before I was presented a prompt. Being in the console for the better part of the day, this was unacceptable.

The first thing I did was upgrade Bash to Zsh. I’d heard great things about Zsh, so I thought I’d give it a try. Zsh is really awesome, but it did not fix the start-up delay I was experiencing previously with Bash.

Doing a little digging around I found a working solution. Apparently Apple keeps system logs in /private/var/log/asl/*.asl. Removing these files made my shell fast again.

Do not remove all files in /private/var/log/asl as there are other files there that are not related to the shell. Leave them in there.

With the above warning in the back of your mind, open your terminal (slowly) and issue the following command:

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

Now quit and restart Terminal or iTerm2 and your prompt should present itself quickly again.

My site is free of ads and trackers. I record privacy-respecting usage statistics with Fathom.

Was this post helpful to you? Why not ☕ Buy me a coffee

Copyright © 1999-2020 Ariejan de Vroom <[email protected]>

Live now; make now always the most precious time. Now will never come again.
    – Jean-Luc Picard


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK