Use ITERM2 to replace the terminal terminal. The overall combination is: Iterm2+oh my zsh +zsh
ITerm2 is terminal's alternative, is a relatively small number of software, more than terminal excellent. Download the official website for http://www.iterm2.cn/, download directly after installation. ITerm2 can set themes, support screen separation, various shortcut keys. Mac default shell is bash, we can switch to zsh, with iTerm2 use, very handy.
(1) Now assume that everyone has ITerm2 installed, we first switch bash to zsh, using the command line as follows:
Chsh-s/bin/zsh
After executing the command, you will be asked to enter your computer's password and enter it. Once completed, you need to exit ITerm2 completely, and when you re-enter, you have switched from bash to zsh. Of course, if you want to use bash any day, you can also use the following commands:
Chsh-s/bin/bash
After the switch succeeds, exits, again enters the time to switch bash successfully, the mutual switch is not very convenient?
If you want to see which shells are installed on your machine, you can use the following command:
Cat/etc/shells
My display is as follows:
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
(2) Install Oh my zsh
Zsh, like bash, is a Unix shell, but most Linux distributions use the Bash shell by default. But Zsh has powerful auto-complete parameters and custom configuration features, and so on, GitHub address: https://github.com/robbyrussell/oh-my-zsh, can let us very fast to get started zsh. I have to say, this oh my zsh really is a good coax, to see the star on the above to know. It is recommended that you use Curl to install automatically and execute the following command line:
Curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
(3) At this point, ITerm2 installation completed, ZSH has been successfully switched, oh my zsh has also been installed OK. The effect of the command line should be as I have shown. Is it the end of our blog? In this way, the meaning of our blog is not much. Let's talk about how to use iTerm2 in detail, so that we can get high efficiency.
"1. Select to copy"
In ITerm2, you can select a word or a line of commands directly with the mouse and you are already copied. There's no need to press the COMMAND+C command.
"2. Screen separation"
This is my favorite iTerm2 function, separated into multiple screens, as long as your computer's screen is large enough to want to divide the number of screens can be. You can do command-line operations at the same time, rather than just one screen, because one command or network download is blocked, and you cannot execute other commands. If you want to execute a lot of commands at the same time, do it.
Command+d: Vertical segmentation;
Command+shift+d: Horizontal Split
3. Quickly call out "
After setting the system hotkey, as long as pressing the shortcut key, ITerm2 will be in the form of translucent from the top to quickly summon, quite cool and efficient. Personal because often use ITERM2, so set a hotkey for: option+ space bar. You can also set the shortcut key according to your preference.
"4. Show Copy History"
Use the shortcut key shift+command+h to quickly display the history that I copied, you can quickly choose to use
"5. Full Screen Toggle"
Command+enter, can quickly achieve full-screen and normal window size switch, very convenient.
Reprint to http://m.blog.csdn.net/article/details?id=50492626
Replace Mac with terminal terminal with ITerm2