UNIXETC
天朝安装ohmyzsh的方法
首先安装zsh
apt update&&apt ugprade -y
apt install zsh -y
如果能够正常访问github.com和githubusercontent.com,那么使用如下命令即可安装ohmyzsh
$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
如果无法访问github.com,那就建议使用gitee提供的国内镜像来安装,方法如下:
git clone https://gitee.com/mirrors/oh-my-zsh.git
cd oh-my-zsh/tools
vi ./install.sh
找到install.sh
中的REMOTE=${REMOTE:-https://github.com/${REPO}.git}
,将其修改为REMOTE=${REMOTE:-https://gitee.com/mirrors/oh-my-zsh.git}
,保存即可。
使用以下命令可便携修改:
sed -i 's%https://github.com/${REPO}.git%https://gitee.com/mirrors/oh-my-zsh.git%g' oh-my-zsh/tools/install.sh
最后执行./install.sh
就可以使用天朝镜像来安装ohmyzsh。
➜ ~ neofetch
_,met$$$$$gg. root@vmd
,g$$$$$$$$$$$$$$$P. --------
,g$$P" """Y$$.". OS: Debian GNU/Linux 12 (bookworm) x86_64
,$$P' `$$$. Host: Virtual Machine 7.0
',$$P ,ggs. `$$b: Kernel: 6.1.0-37-amd64
`d$$' ,$P"' . $$$ Uptime: 1 hour, 31 mins
$$P d$' , $$P Packages: 588 (dpkg)
$$: $$. - ,d$$' Shell: zsh 5.9
$$; Y$b._ _,d$P' Resolution: 1024x768
Y$$. `.`"Y$$$$P"' Terminal: /dev/pts/1
`$$b "-.__ CPU: Intel i5-4310M (1) @ 2.693GHz
`Y$$ GPU: 00:08.0 Microsoft Corporation Hyper-V virtual VGA
`Y$$. Memory: 356MiB / 681MiB
`$$b.
`Y$$b.
`"Y$b._
`"""
➜ ~