Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Bash environment is automatically install and initialize oh-my-zsh & autojump zsh     - Linux Network Programming - raw socket instance: MAC Address Scanner (Programming)

- The three-way division of the sorting algorithm Quicksort (Programming)

- Linux redirection and piping (Linux)

- Disk storage structure and file recovery experiment (FAT file system) (Linux)

- pscp use Detailed Windows and Linux each file transfer tool (Linux)

- Additional SQL Server 5123 database reported error (Database)

- Linux Command Tutorial: Ubuntu apt-get command (Linux)

- Linux Network Programming - libnet Guide (Programming)

- Python image processing library (PIL) to install and simple to use (Linux)

- BCP importing and exporting large amounts of data Practice (Database)

- MySQL master-slave delay problem (Database)

- Open SSH remote access service that allows Android phone Ubuntu 14.04 (Linux)

- After you change the GRUB boot disk partition repair (Linux)

- CentOS RedHat YUM Source Extensions Supplement (including 32-bit, 64-bit) (Linux)

- Approach the next Linux shared interrupts (Linux)

- Linux Network Programming - non-blocking program (Programming)

- MongoDB collection data migration to MySQL database (Database)

- CentOS 7 server environment to quickly build Linux (Server)

- Network Security: SYN attacks against under linux (Linux)

- Forbid screen change the window size when creating a new window under CentOS (Linux)

 
         
  Bash environment is automatically install and initialize oh-my-zsh & autojump zsh
     
  Add Date : 2018-11-21      
         
         
         
  Linux and Mac system default shell is bash, but the real power should belong to zsh shell, and completely control the bash, is the shell of the ultimate killer, there are many features not bash, but zsh initial configuration is too complicated, popular rate has been low, until a man named Robby Russell guy on github developed oh-my-zsh project, so that we use zsh convenience is greatly improved.

Since the company's computer is windows, toss under cygwin, and installed zsh, so start with a lot of convenience to maintain, and I put autojump projects are integrated together, and finally wrote a script automatic installation, you can automatically from the current bash installation environment Oh-my-zsh, autojump and initialize zsh. Currently only supports Ubuntu, CentOS, Debian.

I gather that this zsh profile online support plugin (git autojump history history-substring-search systemadmin systemd), a detailed program to see the plugin source code ~ .oh-my-zsh / plugins /.

See autojump autojump use of official documents. https://github.com/wting/autojump
history-substring-search Search history bright very strong, strong enough to make you suddenly tongue.
systemadmin SA integrates many commonly used commands.
systemd for centos7 after systemctl streamlining of intelligence.

#! / Bin / bash
#Author: Shanker
#set -x
#set -u
clearhacker
  
echo ""
echo "################################################ ############# "
echo "# Automatically to Install oh-my-zsh and initialize it #"
echo "# Intro: https://github.com/sangrealest/shanker #"
echo "# Author: Shanker #"
echo "################################################ ############# "
echo ""
#if [ `id -u` -ne 0]
#then
# Echo "Need root to run is, try with sudo"
# Exit 1
#fi
function checkOs () {
    if [-f / etc / RedHat-release]
    then
        OS = "CentOS"
    elif [-z! "` cat / etc / issue | grep -i bian` "]
    then
        OS = "Debian"
    elif [-z! "` cat / etc / issue | grep -i ubuntu` "]
    then
        OS = "Ubuntu"
    else
        echo "Not supported OS"
        exit 1
    fi
}
function installSoftware () {
if [ "$ OS" == 'CentOS']
then
    sudo yum -y install zsh git
else
    sudo apt-get -y install zsh git
fi
zshPath = "` which zsh` "
}
function downloadFile () {
    cd ~
    git clone https://github.com/robbyrussell/oh-my-zsh.git ~ / .oh-my-zsh
    git clone https://github.com/joelthelion/autojump.git
    git clone https://github.com/sangrealest/initzsh
}
function installAutojump () {
    cd ~ / autojump
    ./install.py
cat >> ~ / .zshrc << EOF
[[-s ~ / .autojump / Etc / profile.d / autojump.sh]] && source ~ / .autojump / etc / profile.d / autojump.sh
autoload -U compinit && compinit -u
EOF
}
function configZsh () {
    if [-f ".zsh_history"]
    then
        mv .zsh_history {., backup}
    fi
    sudo chsh -s "$ zshPath"
    cp ~ / initzsh / zshrc ~ / .zshrc
}
function main () {
checkOs
installSoftware
downloadFile
configZsh
installAutojump
}
main

If cygwin use zsh, you only need to add a line inside the .bashrc / bin / zsh can.
     
         
         
         
  More:      
 
- Use exp exported EXP-00091 error (Database)
- ADSL router to defend their own network security methods (Linux)
- Linux system monitoring tool set cpu (Linux)
- Linux kernel likely and unlikely to resolve macro definitions (Linux)
- Grep, Ack, Ag searches Efficiency Comparison (Linux)
- Unsafe reboot start (Linux)
- Linux System Getting Started Learning: Debian download, installation and graphical interface (Linux)
- C ++: Postmodern systems programming language (Programming)
- MySQL Tutorial: Building MySQL Cluster under Linux (Database)
- Eight kinds of techniques to solve hard problems Linux (Linux)
- Oracle 11g partition maintenance (Nice) - Truncating And Partitions (Database)
- Linux RPM default installation path (Linux)
- df show disk space usage (Linux)
- Android 4.2 compilation notes (Programming)
- Logging information through the web GUI (LogAnalyzer) (Server)
- Shared directory settings between Linux and Linux (Linux)
- Android Application Development: an argument between Activity (Programming)
- a virtual machine created migrated to host RHEL6.4 on Ubuntu 14.04 (Linux)
- Linux Crontab Timing task command Detailed (Linux)
- Linux find command usage practices (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.