WYB188

  • 主页
所有文章 友链 关于我

WYB188

  • 主页

Ubuntu&Mac配置zsh

2019-05-21

记录一下Ubuntu&Mac配置zsh

Ubuntu下配置zsh

安装

  • 安装zsh并修改shell为zsh

    1
    2
    3
    4
    5
    sudo apt-get install zsh
    chsh -s /bin/zsh

    若系统中没有git,需要安装git
    sudo apt-get install git
  • 安装oh-my-zsh

    1
    sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  • 安装zsh-syntax-highlighting语法高亮插件

    1
    2
    3
    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
    echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
    source ~/.zshrc
  • 安装zsh-autosuggestions语法历史记录插件

    • 克隆插件到本地

      1
      git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
    • 克隆后使用vim编辑~/.zshrc文件

      1
      vim ~/.zshrc
    • 在plugins中加入
      zsh-autosuggestions

    • 并在最后一行加入

      1
      source $ZSH_CUSTOM/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
    • 保存后source一下

      1
      source ~/.zshrc

卸载

1
sudo sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/uninstall.sh)"

Mac下配置zsh

安装

  • 安装zsh

    1
    brew install zsh
  • 修改默认Shell

    • 编辑/etc/shells文件,在文件中加入

      1
      2
      3
      /usr/local/bin/zsh
      或者
      /bin/zsh
    • 运行命令

      1
      2
      3
      chsh -s /usr/local/bin/zsh
      或者
      chsh -s /bin/zsh
  • 安装oh-my-zsh

    • 若系统中无git,先安装git

      1
      sudo brew install git
    • 安装oh-my-zsh

      1
      sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    • 高亮和历史记录插件和上面ubuntu的一样

赏

谢谢你请我吃糖果

支付宝
微信
  • 记录

扫一扫,分享到微信

微信分享二维码
IIS踩坑
Python 爬取英语听力答案
  1. 1. Ubuntu下配置zsh
    1. 1.1. 安装
    2. 1.2. 卸载
  2. 2. Mac下配置zsh
    1. 2.1. 安装
© 2021 WYB188
Hexo Theme Yilia by Litten
  • 所有文章
  • 友链
  • 关于我

tag:

  • CTF
  • JavaWeb
  • 记录
  • 数据结构与算法
  • MySql
  • Kali
  • OS
  • Raspberry
  • Python
  • web安全
  • 算法
  • Learn
  • 服务器
  • C++
  • 计算机网络

    缺失模块。
    1、请确保node版本大于6.2
    2、在博客根目录(注意不是yilia根目录)执行以下命令:
    npm i hexo-generator-json-content --save

    3、在根目录_config.yml里添加配置:

      jsonContent:
        meta: false
        pages: false
        posts:
          title: true
          date: true
          path: true
          text: false
          raw: false
          content: false
          slug: false
          updated: false
          comments: false
          link: false
          permalink: false
          excerpt: false
          categories: false
          tags: true
    

  • xnianq
  • triple
  • Arybin
  • Dawn
  • Li
  • Rmb122
A Student Of HFUT

Fake CTFer