網(wǎng)站首頁 編程語言 正文
安裝zsh&oh-my-zsh(沒有root權(quán)限)
想要安裝智能絲滑的oh-my-zsh,首先check是否安裝了zsh。
zsh --version
若zsh: command not found,則首先需要安裝zsh,否則直接跳至step 2。
step 1 安裝zsh
# 下載最新的zsh安裝包
wget -O zsh.tar.xz https://sourceforge.net/projects/zsh/files/latest/download --no-check-certificate
mkdir zsh && unxz zsh.tar.xz && tar -xvf zsh.tar -C zsh --strip-components 1
cd zsh
# 編譯zsh
./configure --prefix=$HOME/zsh
make && make install
# 安裝完成后。加入環(huán)境變量.bashrc
export PATH=$HOME/zsh/bin:$PATH
# 生效
source ~/.bashrc
# 可能會(huì)報(bào)錯(cuò)This is probably a library called 'curses' or 'ncurses'.
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz
mkdir ncurses
tar -xvf ncurses-6.0.tar.gz
cd ncurses-6.0
./configure --prefix=$HOME/ncurses --with-shared --without-debug --enable-widec
make && make install
# 安裝完成后
export CXXFLAGS="-fPIC"
export CFLAGS="-fPIC"
export NCURSES_HOME=$HOME/ncurses # 這里表示家目錄的ncurses目錄,可以自己設(shè)置一個(gè)想要的路徑
export PATH=$NCURSES_HOME/bin:$PATH
export LD_LIBRARY_PATH=$NCURSES_HOME/lib:$LD_LIBRARY_PATH
export CPPFLAGS="-I$NCURSES_HOME/include" LDFLAGS="-L$NCURSES_HOME/lib"
加入~/.bashrc
source ~/.bashrc
# 然后編譯zsh即可
step 2 安裝oh-my-zsh
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
source ~/.zshrc
參考:
Linux 非 root 用戶安裝 zsh, 并用 oh-my-zsh 進(jìn)行配置
Install zsh without root access?
原文鏈接:https://blog.csdn.net/weixin_42262721/article/details/123531486
相關(guān)推薦
- 2022-02-09 深入了解C++異常處理_C 語言
- 2022-11-17 python中關(guān)于os.path.pardir的一些坑_python
- 2022-10-12 C#設(shè)計(jì)模式之建造者模式生成器模式示例詳解_C#教程
- 2022-04-18 pytorch自定義loss損失函數(shù)_python
- 2022-03-26 C++中靜態(tài)數(shù)據(jù)成員使用示例_C 語言
- 2022-03-31 python猜單詞游戲的實(shí)現(xiàn)_python
- 2021-12-05 Android?NDK開發(fā)(C語言基本數(shù)據(jù)類型)_Android
- 2022-05-15 ASP.NET?CORE實(shí)現(xiàn)跨域_實(shí)用技巧
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細(xì)win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運(yùn)行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲(chǔ)小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運(yùn)算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認(rèn)證信息的處理
- Spring Security之認(rèn)證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯(cuò)誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實(shí)現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡單動(dòng)態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對(duì)象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊(duì)列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠(yuǎn)程分支