Git 为文件添加执行权限

在window环境下添加的sh文件,在Linux环境拉取后,默认是没有执行权限的。 添加执行权限 git update-index --chmod=+x backup.sh 然后提交、push,Linux环境拉去后,就有执行权限了。

在 Rocky Linux 9 上启用 Epel 和 Epel-Next 仓库

在默认的源里面,没有类似screen这些包,通过开启 epel 和 epel-next 仓库解决类似 Error: Unable to find a match: screen 的问题

dnf config-manager --set-enabled crb
dnf install epel-release epel-next-release

参考:https://www.rockylinux.cn/notes/zai-rocky-linux-9-shang-qi-yong-epel-he-remi-cang-ku.html

Rocky Linux 9 安装 Oh My Zsh

安装依赖

dnf -y install zsh git util-linux-user

安装 oh my zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

这里需要输入y设置zsh为默认shell

安装常用插件

自动补全插件 zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions 

语法高亮插件 zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

编辑.zshrc文件启用插件 找到 plugins= 这一行,添加zsh-autosuggestions zsh-syntax-highlighting,例如: