#修复ifconfig
1、查看 /sbin/ifconfig是否存在
echo $PATH
2、查看ifconfig命令是否存在
ls /sbin |grep ifconfig
如果ifconfig命令存在,查看环境变量设置
#echo $PATH
如果环境变量中没有包含ifconfig命令的路径
临时修改环境变量:在shell中输入
$export PATH = $PATH:/sbin
然后再输入ifconfig命令即可,但是这只是临时更改了shell中的PATH,如果关闭shell,则修改消失,下次还需要重复如上操作
永久修改PATH变量使之包含/sbin路径:
打开/etc/profile文件,在其中输入export PATH=$PATH:/sbin,保存并重启X即可,这样一来,PATH路径永久修改成功,以后任何时候只需书序ifconfig命令即可
3、如果ifconfig命令不存在
yum upgrade
yum install net-tools

 
#设置静态ip
/etc/sysconfig/network-scrips/ifcfg-ens912
BootPROTO=static
ONBOOT=yes #开机启动
IPADDR0=ip
PREFIXO0=24 #子网掩码
GATEWAY0=ip
DNS1=ip
#设置yum代理
/etc/yum.conf
proxy=http://域/用户名:密码@ip:端口
 
#安装图形化界面
yum grouplist
yum groupinstall GNOME Desktop
startx

相关文章:

  • 2021-07-07
  • 2021-05-21
  • 2021-11-18
  • 2022-12-23
  • 2021-08-18
  • 2021-10-09
  • 2021-10-10
猜你喜欢
  • 2021-07-31
  • 2022-12-23
  • 2022-02-05
  • 2021-09-11
  • 2021-11-24
  • 2021-04-25
  • 2021-09-26
相关资源
相似解决方案