zoukankan      html  css  js  c++  java
  • linux 配置网卡

    if config 配置网卡

    ifconfig :显示所有网卡信息

    ifconfig eth0 : 查看网卡eth0的信息

    ifconfig eth0 down :禁用eth0

    if config eth0 up : 激活eth0

    if config eth0 192.168.1.101 : 配置网卡eth0的IP地址

    网络设置:

    sudo route add default gw 192.168.1.1  : 添加网关

    /etc/network/interfaces restart  : 重启网络服务

    配置DNS:

    sudo vi /etc/resolv.conf :

    nameserver 202.96.134.133

    nameserver 202.96.128.68

    nameserver 202.96.128.68

    配置静态IP:

    sudo vi /etc/network/interfaces :

    iface eth0 inet static  # 配置eth0接口为静态地址

    address 192.168.1.10

    gateway 192.168.1.254

    netmask 255.255.255.0

    network 192.168.1.0

    broadcast 192.168.1.255

    抓包:

    tcpdump -i wlan0

    返回上一次的路径 :

    cd -

     

  • 相关阅读:
    soap-学习
    Redis教程
    Java 不可变对象
    java volatile
    Go语言
    mongodb 基础语法
    Linux 命令大全
    Java json字符串对比
    sqlserver 数据库阻塞和死锁
    http 和 https 的区别
  • 原文地址:https://www.cnblogs.com/cjj-zyj/p/9914935.html
Copyright © 2011-2022 走看看