zoukankan      html  css  js  c++  java
  • Linux启动网卡

    ifconfig命令可以用于查看Linux活动网卡与IP地址、子网掩码或者mac地址等信息

    1. [root@localhost ~]# ifconfig  
    2. eth0      Link encap:Ethernet  HWaddr 08:00:27:D4:71:2D    
    3.           inet addr:192.168.1.104  Bcast:255.255.255.255  Mask:255.255.255.0  
    4.           inet6 addr: fe80::a00:27ff:fed4:712d/64 Scope:Link  
    5.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1  
    6.           RX packets:1693 errors:0 dropped:0 overruns:0 frame:0  
    7.           TX packets:255 errors:0 dropped:0 overruns:0 carrier:0  
    8.           collisions:0 txqueuelen:1000   
    9.           RX bytes:118346 (115.5 KiB)  TX bytes:53987 (52.7 KiB)  
    10.           Interrupt:10 Base address:0xd020   
    11.   
    12. lo        Link encap:Local Loopback    
    13.           inet addr:127.0.0.1  Mask:255.0.0.0  
    14.           inet6 addr: ::1/128 Scope:Host  
    15.           UP LOOPBACK RUNNING  MTU:16436  Metric:1  
    16.           RX packets:7 errors:0 dropped:0 overruns:0 frame:0  
    17.           TX packets:7 errors:0 dropped:0 overruns:0 carrier:0  
    18.           collisions:0 txqueuelen:0   
    19.           RX bytes:672 (672.0 b)  TX bytes:672 (672.0 b) 

    eth0 是Linux主机的一块网卡,lo是本地回环

    ifconfig eth0 up              #可以用于启动网卡
    ifconfig eth0 down            #可以用于禁用网卡
    ifconfig eth0 192.168.1.101   #可以给主机制定静态地址


    如果要使用DHCP分配,可以使用dhclient命令
    在终端直接输入dhclient即可:)

  • 相关阅读:
    激活函数(ReLU, Swish, Maxout)
    损失函数
    md5sum命令行使用注意事项
    Jetson ARM SeetaFace编译
    Linux下的wine生活(QQ/微信/Office)
    人脸识别引擎SeetaFace编译 ubuntu
    Python为8bit深度图像应用color map
    MySQL、MongoDB、Redis数据库Docker镜像制作
    bash的管道符与重定向
    Docker 及 nvidia-docker 使用
  • 原文地址:https://www.cnblogs.com/ylqmf/p/2225672.html
Copyright © 2011-2022 走看看