• Linux——Centos8虚拟机添加网卡未显示


    前言

    虽然Centos8已经不维护了,不过之前虚拟机安装的是8,刚好今天做东西,凑合用下呗~

    内容

    其实就两个命令而已~

    查看设备

    [root@php-dev ~]# nmcli device
    DEVICE  TYPE      STATE         CONNECTION 
    ens33   ethernet  connected     ens33      
    ens37   ethernet  disconnected  -- 
    

    激活设备

    [root@php-dev ~]# nmcli connection add con-name ens37 ifname ens37 type ethernet 
    Connection 'ens37' (371c3288-0fdd-4a6b-89d1-1caf5acc3b92) successfully added.
    

    查看IP

    [root@php-dev ~]# ip addr
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 00:0c:29:f2:50:20 brd ff:ff:ff:ff:ff:ff
        inet 192.168.223.21/24 brd 192.168.223.255 scope global noprefixroute ens33
           valid_lft forever preferred_lft forever
        inet6 fe80::f43f:d28c:69d9:e3c9/64 scope link noprefixroute 
           valid_lft forever preferred_lft forever
    3: ens37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 00:0c:29:f2:50:2a brd ff:ff:ff:ff:ff:ff
        inet 192.168.223.19/24 brd 192.168.223.255 scope global dynamic noprefixroute ens37
           valid_lft 1792sec preferred_lft 1792sec
        inet6 fe80::9fb3:2e77:eb03:9690/64 scope link noprefixroute 
           valid_lft forever preferred_lft forever
    
    学无止境,谦卑而行.
  • 相关阅读:
    IMP-00009: 导出文件异常结束
    Unknown collation: 'utf8mb4_unicode_ci'
    从 github 执行 git clone 一个大的项目时提示 error: RPC failed
    PHP 中获取当前时间[Datetime Now]
    wordpress 常用函数 checked(),selected(),disabled()
    github 有名的问题【ERROR: Permission to .git denied to user】
    SSH 基础
    mixed content 混合内容
    nginx gzip 模块配置
    markdown 书写表格
  • 原文地址:https://www.cnblogs.com/wangyang0210/p/14391325.html
Copyright © 2020-2023  润新知