centos 安装 配置 zsh

centos 编译安装 zsh 和 配置 oh-my-zsh

下载

wget https://jaist.dl.sourceforge.net/project/zsh/zsh/5.9/zsh-5.9.tar.xz

依赖

yum install ncurses-devel

安装zsh

执行:

tar -xvf zsh-5.9.tar.xz
cd zsh-5.9
./configure --prefix=/usr/local/zsh5.9
make && make install

添加信息

# 在 /etc/shells 最后一行加上:/usr/local/bin/zsh
echo "/usr/local/zsh5.9/bin/zsh" >> /etc/shells

# 把默认shell 切换为 zsh,重启系统生效
chsh -s /usr/local/zsh5.9/bin/zsh

安装 oh-my-zsh

oh-my-zsh github 仓库

在 github 代码仓库里写了如何安装 oh-my-zsh

Method Command
curl sh -c “$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”
wget sh -c “$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”
fetch sh -c “$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”

有些人的机器由于环境没有配置好,可能上面三种方式都无法安装。

解决方式:

方案一: 根据提示,配置好环境

方案二 直接在 github 下载项目,改名为 .oh-my-zsh。然后执行下面命令,把 .zshrc 文件复制到 home 目录下

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

重启终端生效

相关推荐

  1. centos 安装 配置 zsh

    2023-12-28 17:00:02       72 阅读
  2. oh-my-zsh 安装配置

    2023-12-28 17:00:02       54 阅读
  3. ZSH 配置

    2023-12-28 17:00:02       32 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-28 17:00:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-28 17:00:02       100 阅读
  3. 在Django里面运行非项目文件

    2023-12-28 17:00:02       82 阅读
  4. Python语言-面向对象

    2023-12-28 17:00:02       91 阅读

热门阅读

  1. mysql-5.6.16的内存泄漏问题

    2023-12-28 17:00:02       61 阅读
  2. CMSIS-RTOS2 函数

    2023-12-28 17:00:02       55 阅读
  3. 复试 || 就业day01(2023.12.27)算法篇

    2023-12-28 17:00:02       45 阅读
  4. Linux telnet命令

    2023-12-28 17:00:02       49 阅读
  5. ROS2 相对于 ROS1 做了哪些改动、有什么不同点

    2023-12-28 17:00:02       45 阅读
  6. k8s 的YAML文件详解

    2023-12-28 17:00:02       49 阅读
  7. TCP与UDP是流式传输协议吗?

    2023-12-28 17:00:02       52 阅读
  8. 2974. 最小数字游戏 23.12.23(二)

    2023-12-28 17:00:02       51 阅读