Many advanced Mac users spend a lot of time at the command line of OS X, accessed through the Terminal app. While generally the Terminal is fast and efficient, sometimes it can slow down over time, or suffer from some performance degradation due to user preference settings. If you feel that Terminal app is being sluggish and could use a speed boost in OS X, use these handful of tricks to speed up the performance of Terminal app and your command line experience.
1: Open New Window & Tabs Faster By Clearing Log Files
If Terminal has gotten progressively slower over time, dumping the Apple System Logs can dramatically speed up the launch of new Terminal windows and tabs, sometimes from seconds down to instantaneous. You can do this two ways, either with the rm command or by moving the files to your Trash, do what works with your comfort level:
This moves all *.asl log files into the users Trash can, which can then be emptied manually:
sudo mv /private/var/log/asl/*.asl ~/.Trash
Meanwhile, the alternative is to use the rm command to delete the files directly:
sudo rm -i /private/var/log/asl/*.asl
The -i flag serves as a protection layer by confirming the file deletion, this is helpful for those new to the terminal and to help prevent errors. If you’re comfortable with the command line and nuking the full directory contents, skip the -i and use -rf instead.
2: Get a Simpler Terminal Theme & Profile for Less Resource Use
Transparent liquid blurred out crazo-backgrounds with antialiased text, looks amazingly great! Right? Yea, Silver Aerogel sure looks cool, but having 20 of these active windows open at once with a bunch of other stuff going on can really slow down the Terminal app needlessly. Use a basic theme instead.
Yes that means ditching the transparencies and fancy blurring backgrounds offered in themes like MagicGelShell or through your own custom creations, and going with a simple colored text on a basic colored background theme instead like “Basic”, “Peppermint”, or “Pro”. Each of these windows uses less RAM and requires less CPU to render the fancy eye candy. The best way to approach this for performance purposes is to set the new startup default as follows:
- Go to Terminal Preferences > Startup
- Pull down the menu for “On startup open New window with settings:” and pick a basic theme
Yes, you can set this per-Terminal window if you want using the Inspector tool, but it’s really best to set the default.
Easy, faster terminal! This is particularly true for older Macs and Macs with limited resources. If you’ve got a maxed out 2014 Mac Pro, well, you probably don’t need to worry so much about this.
3: Boost Launch Speed by Specifying a Launch Shell
Another known trick for speeding up the launch of Terminal app or the opening of new terminal windows ro tabs is to specify a shell, rather than rely on /usr/bin/login (which reads the default login shell setting). This is done through the Terminal app preferences:
1. Go to the “Terminal” window and open “Preferences” and go to the “Startup” tab
2. Find “Shells open with:” and choose “Command (complete path)” and specify your preferred shell
The most common shells are /bin/bash and /bin/zsh but if you’re not sure which you’re currently using you can always check with the ‘echo $SHELL’ command.
4: Consider iTerm2 for Enhanced Performance
Not thrilled with the default Terminal app bundled with OS X and it’s occasional performance hiccups? Consider using iTerm2, an alternative terminal app that is built for performance and features that aren’t available through Apple’s default Mac offering of Terminal.app
Some people absolutely swear by iTerm2 for performance reasons alone, and it’s a free lightweight download. Check it out yourself to see if it works for you. Whatever you go with, enjoy your new, speedier command line experience!
Source:osxdaily.com
No comments:
Post a Comment