QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 837|回复: 8

在debian没有X的情况下,用什么命令配network

[复制链接]
发表于 2004-4-14 10:30:43 | 显示全部楼层 |阅读模式
我在用网络安装debian时, 没配好局域网, 现在apt-get不了软件包, 想重配, 但不知debian下用什么command调出配置界面.

如果想直接修概配置文件,是否这个/etc/network/interface?
发表于 2004-4-14 11:09:13 | 显示全部楼层
redhat)
ifconfig eth0 000.000.000.000     (ip)
route add default gw 000.000.000.000 metric 1    (网馆)
/etc/resolve:
servername 000.000.000.000  (dnsname 记不住了,通用命令, 得便应该也适用)
回复

使用道具 举报

发表于 2004-4-14 15:47:38 | 显示全部楼层
debian的话
要调整2个文件,一个是/etc/network/interfaces,另外一个是/etc/resolv.conf
前一个是ip和网关之类的,后一个是设置dns的
回复

使用道具 举报

 楼主| 发表于 2004-4-15 13:15:43 | 显示全部楼层
[quote:171d3f2d69="cooldidi"]debian的话
要调整2个文件,一个是/etc/network/interfaces,另外一个是/etc/resolv.conf
前一个是ip和网关之类的,后一个是设置dns的[/quote]

正如你所讲的, 就是设这两个文件.  就可以. 但有没有界面命令. 因为在debian安装时,它都会有界面提示. 这样会方便点,而且易记.
回复

使用道具 举报

发表于 2004-4-15 13:17:20 | 显示全部楼层
装etherconf

以后配置时执行:
dpkg-reconfigure etherconf
回复

使用道具 举报

发表于 2004-4-15 15:32:42 | 显示全部楼层
把我的interfaces和resolv.conf帖出来,你自己依葫芦画瓢改吧
/etc/network/interfaces
[code:1]
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
        address 192.168.6.2
        netmask 255.255.255.0
        network 192.168.6.0
        broadcast 192.168.6.255
        gateway 192.168.6.1
[/code:1]
/etc/resolv.conf
[code:1]
nameserver 211.91.216.129
nameserver 211.91.216.101
[/code:1]
回复

使用道具 举报

发表于 2004-4-15 15:37:45 | 显示全部楼层
#apt-get update
#apt-get install etherconf
#dpkg-reconfigure etherconf
按楼上的也可以。
回复

使用道具 举报

发表于 2004-4-16 08:33:48 | 显示全部楼层
呵呵,他的网络还没配好怎么去apt-get啊?
当然只能手动修改interfaces了
回复

使用道具 举报

发表于 2004-4-16 09:51:09 | 显示全部楼层
[quote:c630f0393b="easthero1982"]把我的interfaces和resolv.conf帖出来,你自己依葫芦画瓢改吧
/etc/network/interfaces
[code:1]
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
        address 192.168.6.2
        netmask 255.255.255.0
        network 192.168.6.0
        broadcast 192.168.6.255
        gateway 192.168.6.1
[/code:1]
/etc/resolv.conf
[code:1]
nameserver 211.91.216.129
nameserver 211.91.216.101
[/code:1][/quote]

别忘了,最后还要用
[code:1]#/etc/init.d/networking restart[/code:1]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-5 12:23 , Processed in 0.102598 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表