I. 装机必备

1.1 vim …

1
sudo dnf install vim-enhanced tar wget telnet tree -y

1.2 必要配置

添加自定义配置文件

1
curl https://gitee.com/zanxj/vimrc/raw/main/vimrc > ~/.vimrc

配置系统默认编辑器为 vim

1
echo -e "\n# ====================== The following user-defined =======================\nexport EDITOR=vim\n" >> ~/.bashrc

运行以下命令使更改生效:

1
source ~/.bashrc

II. 可选安装

2.1 unzip

1
sudo yum install unzip -y

2.2 Xshell 传输工具

1
sudo yum install lrzsz -y

2.3 Rsync

1
sudo yum install rsync -y

2.4 htop

2.4.1 RHEL 7

1
sudo yum install htop

2.4.2 RHEL 8

1
2
3
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo yum update
sudo yum install htop

2.4.3 RHEL 9

1
2
3
4
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
sudo yum update
sudo yum install htop

2.5 Git

Linux 安装 Git

III. 其它可选配置

3.1 设置别名

1
echo -e "\n# User-defined alias \nalias ll='ls -lah --color=auto'\n" >> ~/.bashrc

断开当前终端连接,重新进入生效。

3.2 开启 bash 正则识别

1
shopt -s extglob

关闭 bash 正则识别

1
shopt -u extglob

示例:删除当前目录除 test.txt 文件外所有文件

1
rm -rf !(test.txt)