shell脚本自动修改centos7网口名称eth0并配置ip
2020年真是个不好的开始,还没有开始过年就出现这么大的疾病,呆在家里呆了这么多天实在是太无聊了,就写了几个脚本.
系统:centos 7.x(64位)
cat /root/soft_shell/network.sh
#!/bin/env bash PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin export PATH # Check if user is root if [ $(id -u) != "0" ]; then echo "Error: You must be root to run this sc...