安装zsh

#安装zsh
yum install -y zsh
#安装git (已经安装跳过)
yum install -y git
#查看当前的shell
[root@localhost hky]# echo  $SHELL
/bin/bash
#查看已经安装的shell
[root@localhost hky]# cat /etc/shells
/bin/sh
/bin/bash
/usr/bin/sh
/usr/bin/bash
/bin/tcsh
/bin/csh/bin/zsh
#切换shell
[root@localhost hky]# chsh -s /bin/zsh
Changing shell for root.
Shell changed.
#重启 shell 才会生效
[root@localhost hky]# reboot

安装 oh-my-zsh

git clone 速度很慢解决方法

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
autojump 插件安装
git clone https://github.com/wting/autojump wting/autojump
cd wting/autojump
python3 install.py
# 运行结果
[[ -s /root/.autojump/etc/profile.d/autojump.sh ]] && source /root/.autojump/etc/profile.d/autojump.shautoload -U compinit && compinit -u
#更改配置文件
vim .zshrc
zsh-syntax-highlighting 语法高亮
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
#更改配置文件
vim .zshrc
zsh-autosuggestions 自动提示
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
#更改配置文件
vim .zshrc
#使配置文件生效
source ~/.zshrc

完整配置文件 .zshrc 配置文件

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.plugins=(gitautojumpzsh-syntax-highlightingzsh-autosuggestions)source $ZSH/oh-my-zsh.sh# User configuration# export MANPATH="/usr/local/man:$MANPATH"# You may need to manually set your language environment
# export LANG=en_US.UTF-8# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi# Compilation flags
# export ARCHFLAGS="-arch x86_64"# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
[[ -s /root/.autojump/etc/profile.d/autojump.sh ]] && source /root/.autojump/etc/profile.d/autojump.shautoload -U compinit && compinit -ualias to='j'
alias kill='kill -9'

centos 安装zsh oh-my-zsh相关推荐

  1. Linux、Ubuntu、CentOS安装和配置zsh

    文章目录 01 zsh的安装 02 配置zsh 2.1 安装oh-my-zsh 2.2 查看oh-my-zsh目录 2.3 oh-my-zsh 插件的管理 2.3.1 添加插件 2.3.2 zsh-a ...

  2. Ubuntu 18.04 安装配置Oh My Zsh 主题设置

    Oh MyZsh 是什么 Oh My Zsh 是一个开源的,社区驱动的框架,用于管理zsh配置 Oh My Zsh,官网地址 Oh My Zsh ,GitHub 地址 Zsh 是什么 Zsh 兼容 B ...

  3. MAC上安装iTerm2+oh my zsh+设置Dracula主题

    MAC上安装iTerm2+oh my zsh+设置dracula主题 iTerm2 + oh my zsh 安装教程 Dracula主题安装教程 问题解决教程

  4. zsh 安装及 Oh My Zsh 配置

    文章目录 zsh 安装及 Oh My Zsh 安装配置 安装 zsh macOS 安装 zsh Ubuntu 安装 zsh zsh 设置 查看系统已有的 shell 更改默认 shell 查看当前使用 ...

  5. mac下 iterm+Zsh+Oh My Zsh+tmux 配置方案

    iterm2: iterm的一些优点: 兼容性好,远程服务器 vi 什么的低版本能很好兼容,Terminal 则会出问题 (我是长时间在服务器上混的人,但其实并没有这种感觉--) 支持 xterm-2 ...

  6. CentOS 安装docker.ce报错提示containerd.io >= 1.2.2-3问题

    centos安装docker.ce遇到报错,提示如下 # yum install -y docker-ce Last metadata expiration check: 0:01:49 ago on ...

  7. CentOS安装crontab

    CentOS安装crontab: yum install crontabs 说明: service crond start //启动服务 service crond stop //关闭服务 servi ...

  8. CentOS 安装Apache

    # centOS 安装A M P 环境 [参考简书作者,非常感谢!!!](https://www.jianshu.com/p/bc14ff0ab1c7) ## 一 Apache 环境安装 1 安装Ap ...

  9. centos 安装 NTFS支持

    2019独角兽企业重金招聘Python工程师标准>>> 参考的原文网址: centos安装完之后,默认是不支持NTFS磁盘格式的,解决的方法之一就是安装NTFS-3G模块,但是默认的 ...

  10. centos安装及网络配置

    感谢老师传授,共同学习!谢谢!仅供自己日后复习之用! centos安装关键点: 创建分区: / 系统分区 /boot 启动分区 SWAP 交换分区,虚拟内存.主要是缓解物理内存不足. 虚拟化软件: V ...

最新文章

  1. javascript编程风格
  2. centos7重启桌面服务_CENTOS7安装桌面系统
  3. GDB入门:A GDB Tutorial with Examples
  4. Spark配置属性详解
  5. 基于Echarts+HTML5可视化数据大屏展示—大数据智慧数据平台
  6. java future用法_你必须掌握的 21 个 Java 核心技术
  7. WebSphere MQ通道的建立
  8. 一个架构师谈什么是架构,以及怎么成为架构师
  9. DeepMind新建虚拟认识实验室,像研究人类一样研究AI(代码开源)
  10. 2与27日 双目视觉系统,相机标定,矫正,匹配(特征,稠密),特征提取的方法,得到视差图
  11. Python——程序设计:商贷月供计算器
  12. 7-3 统计学生成绩 (15 分)
  13. 阿里云申请和部署项目
  14. switch-case使用方法
  15. Android 之路35---Fragment
  16. uniapp代驾+顺风车+货运三合一源码分享
  17. 强势安利 Setapp 优质软件
  18. # COCO2017 数据集下载
  19. 百度小程序使用教程(添加内容)并提交百度小程序
  20. java十六进制字符串和中文(字符串)互转以及转换乱码问题总结

热门文章

  1. 欧盟ECHA 官方表示近期会加严REACH 的监管执法!
  2. A-Level数学例题解析及练习Natural logarithms
  3. 如何让企业督办管理系统对接第三方应用
  4. 极密宝、Lastpass、1password密码管理软件到底哪家强?
  5. 南开22春学期(高起本1709、全层次1803-2103)《职场心理(麦课)》在线作业【标准答案】
  6. Win10系统软件打不开
  7. 解决java编译错误:编码GBK的不可映射字符
  8. Java课程设计网络打字游戏
  9. steam api接口 php,Steam API调试
  10. 电信iot平台和移动oneNet平台使用心得