当前位置:首页 » 币种行情 » debian修改eth0ip

debian修改eth0ip

发布时间: 2024-04-15 08:18:43

『壹』 linux debian绯荤粺鍙岀綉鍗″唴澶栫綉閰嶇疆闂棰 100

璁剧疆璺鐢卞嵆鍙锛屽熀鏈鎬濊矾灏辨槸锛
1銆佹墍鏈塱p鍖呴粯璁ら氳繃192.168.1.1杩涜岃浆鍙戯紝
route add default 鎼滅储gw 192.168.1.1
2銆佸瑰唴缃戣剧疆杞鍙戠壒渚嬶紝閫氳繃鎸囧畾缃戝崱杞鍙戯紝
route add -net 172.18.0.0 netmask 255.255.0.0 dev eth0

涓婇潰鍛戒护鐨勭綉娈靛拰璁惧囧悕绉帮紝鏍规嵁鍏蜂綋鎯呭喌璋冩暣銆傛繁鍏ヤ簡瑙linux寤鸿瀛︿範銆妉inux灏辫ヨ繖涔堝︺嬭繖鏈涔

『贰』 Debian 双网卡配置

Debian可通过以下步嫌升骤配置网卡:扒者改

1、将当前目录切换到网卡配置文件所在的目录,网卡配置文件所在的目录为“/etc/network/”。使用“cd /etc/network”命令切换到网卡配置文件所在目录;

2、使用nano编辑器或者vim编辑器,编辑网卡配置文件(interfaces),在当前目录下执行命令"nano interfaces"即可编辑网卡配置文件的内容;

3、使用“Ctrl + O”组合键保存网卡配置文件内容,使用“Ctrl + X”组合键退出nano编辑器。使用“cat interfaces”命春判令查看已修改的网卡配置文件的内容;

4、使用“/etc/init.d/networking restart”命令使用网卡配置文件内容生效,并使用“ifconfig”命令查看网卡eth0网卡的ip地址;

5、使用nano保存、退出组合键保存文件内容。使用网卡重启命令重启即可获取到IP地址。

# This file describes the network interfaces availableon your system

# and how to activate them. For more information, see interfaces(5).

#/etc/network/interfaces

# The loopback network interface

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet static

address 192.168.1.116

netmask 255.255.255.0

gateway 192.168.1.2

auto eth0:1

iface eth0:1 inet static

address 192.168.1.135

netmask 255.255.255.0

gateway 192.168.1.2

1命令

uname -r                                                        //查看内核

lsb_release -a  //所有版本信息

cat /etc/debian_version                               //查看deb

热点内容
收到假eth币 发布:2025-10-20 08:58:16 浏览:973
暗黑破坏神2eth打孔 发布:2025-10-20 08:42:58 浏览:105
BTC和CBT是一样的吗 发布:2025-10-20 08:42:57 浏览:233
华硕trx40Pro供电 发布:2025-10-20 08:33:26 浏览:432
晒人民币编号的朋友圈 发布:2025-10-20 08:25:32 浏览:687
doge格式 发布:2025-10-20 08:02:00 浏览:382
以太坊会爆发吗 发布:2025-10-20 08:01:59 浏览:772
一台比特币矿机的功率 发布:2025-10-20 07:39:24 浏览:925
trx辅助带 发布:2025-10-20 07:35:29 浏览:48
比特币哈希值有多少位 发布:2025-10-20 07:31:20 浏览:633