Introductory Article
Linux, we generally use the command line to operate, a good-looking command line, can make our work comfortable, this tutorial can be made to complete the command line style:
Of course, you can change the more cool command-line interface here, for example.
Prepare the article
Before starting the installation, we need to prepare some software
- 1 A virtual machine containing a centos system can be a real machine;
- 2 can connect to the network
- 3 Epel Source
- 4 zsh RPM installation package (can be installed with Yum)
- 5 git Install package (can be installed with Yum)
- 6 Oh-my-zsh installation package (can be installed with wget)
- 7 PIP installation Package
- 8 Power Line installation package
Configuration Chapterneed to change the default shell chapter
Below to get to the chase:
Command display:
- Ping www.baidu.com
- wget https://mirrors.ustc.edu.cn/epel//6/x86_64/epel-release-6-8.noarch.rpm
- RPM-IVH epel-release-6-8.noarch.rpm
- Yum Clean All
- Yum Repolist
- Yum Install zsh
- Chsh-s/bin/zsh
- Yum Install git
- Sh-c "$ (wget Https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh-O- )"
- Vim. ZSHRC
1) test network connectivity
Use the command ping www.baidu.com to test, if there is a network can parse out the address, accept the packet, if not can display the request failed, such as:
If the network is not connected, please make sure that the NIC is configured correctly and connect to the 2nd step.
2) Configure Epel source
Network Source Selection There are many, 163 source, Ali, local source can be, here choose Epel Source, because the software on the source is relatively full and new, we use the first with Windows download good epel source configuration rpm Package, this package will help us automatically configure the Epel yum source, the address is as follows:
Http://download.fedoraproject.org/pub/epel
Enter the URL to select the system version, my is 6 so choose, and then select platform Architecture, my is x84-64 point gold in the following:
Click this RPM package to download to the desktop of Windows, and then use the Xshell File Transfer tool to transfer to the system where you want to change the source:
On the left is your Windows system directory, find your downloaded RPM package location, drag directly into the box to the right, the right is your Linux system directory, mine is in /app.
You can also get this RPM package directly using the command below: wget https://mirrors.ustc.edu.cn/epel//6/x86_64/epel-release-6-8.noarch.rpm
Then execute the following command:RPM-IVH epel-release-6-8.noarch.rpm to install this RPM package
The following command then clears and updates the Yum list:yum clean all; Yum repolist
Yum Source Configuration Complete
3) Install Zsh
Let's take a look at our current shell using the command echo $SHELL can be viewed and will generally show/bin/bash this is the default shell for most systems, and we then use the command to see what SHELL we have installed Cat/etc/shells
We need to install zsh. Perform the yum install zsh installation zsh.
After the installation is complete, execute:chsh-s/bin/zsh Replace the default shell, and execute the command reboot reboot after completion to change the default shell.
4) Install Git
We need git support for this landscaping software, so we need to install git and execute the command yum install git can be installed git
5) Install Oh-my-zsh
After the preparation, we installed OH-MY-ZSH,OH-MY-ZSH is an open-source framework, which inherits a lot of skin, and simplifies the complex use of zsh, and adds a lot of features, so that we can use the zsh very well, Execute the following command to install Oh-my-zsh:
" $ (wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh-O- )"
When the following interface shows the installation is successful
At this time OH-MY-ZSH has been installed successfully, we can enter the configuration file to modify the theme, Oh-my-zsh itself integrates a part of the theme, we can directly use, if not enough for you to use, you can also go to the following URL to download:
Https://github.com/robbyrussell/oh-my-zsh/wiki/themes
We use the default theme here, we switch directly to the home directory, and then change the. ZSHRC,vim. ZSHRC instead:
Our command-line style changes are complete here.
no need to change the default shell article
Command display:
- Yum Install Python-pip
- Pip install powerline-status
- Pip Show powerline-status
- Vim. BASHRC
1) Install PIP tool
# Yum Install Python-pip
2) Install power Line
# pip install powerline-status install power Line
# pip show powerline- Status View power line State
metadata-version:1.1
name:powerline-status
version:2.6
summary:the Ultimate Statusline/prompt Utility.
home-page:https://github.com/powerline/powerline
author:kim Silkebaekken
author-email: [email Protected]
license:mit
location:/ usr/lib/python2.7/site-packages location need to record
3) configuration powerline
Edit the. BASHRC command:vim. BASHRC Add the following:
Export term= "Screen-256color"
Powerline-daemon-q
Powerline_bash_continuation=1
Powerline_bash_select=1
. /usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh
Once you have found the exact location of the powerline, replace the position in the following line with the/usr/local/lib/python2.7/dist-packages corresponding to the situation in your system.
After exiting the login, you can see how the changes look.
The shell beautification tutorial under CentOS