ubuntu网络配置文件|修改Ubuntu配置文件已达到修改静态IP地址

ubuntu网络配置文件|修改Ubuntu配置文件已达到修改静态IP地址的第1张示图

⑴ Ubuntu服务器的网络配置文件在哪 (不在/etc/network/下)

Linux 系统的网络配置文件在 /etc/sysconfig/network-scripts/ 下面,具体的网卡名称系统默认会生成。

配置模内板如下:

另外容,可快速配置网卡信息,输入“ifconfig eth0 *.*.*.*”,点击enter键,输入“ifconfig”,点击enter键,可查看IP地址。

⑵ ubuntu server操作系统下与网络配置相关的文件有哪些

Ubuntu 的网络配置文件主要有以下几个IP地址配置文件: /etc/network/interfaces打开后里面可设置DHCP或手动设置静态ip。前面auto eth0,让网卡开机自动挂载.1. 以DHCP方式配置网卡编辑文件/etc/network/interfaces:sudo vi /etc/network/interfaces并用下面的行来替换有关eth0的行:# The primary network interface – use DHCP to find our addressauto eth0iface eth0 inet dhcp用下面的命令使网络设置生效:sudo /etc/init.d/networking restart也可以在命令行下直接输入下面的命令来获取地址sudo dhclient eth02. 为网卡配置静态IP地址编辑文件/etc/network/interfaces:sudo vi /etc/network/interfaces并用下面的行来替换有关eth0的行:# The primary network interfaceauto eth0iface eth0 inet staticaddress 192.168.3.90gateway 192.168.3.1netmask 255.255.255.0将上面的ip地址等信息换成你自己就可以了.用下面的命令使网络设置生效:sudo /etc/init.d/networking restart3. 设定第二个IP地址(虚拟IP地址)编辑文件/etc/network/interfaces:sudo vi /etc/network/interfaces在该文件中添加如下的行:auto eth0:1iface eth0:1 inet staticaddress 192.168.1.60netmask 255.255.255.0network x.x.x.xbroadcast x.x.x.xgateway x.x.x.x根据你的情况填上所有诸如address,netmask,network,broadcast和gateways等信息.用下面的命令使网络设置生效:sudo /etc/init.d/networking restart主机名称配置文件(/bin/hostname)使用下面的命令来查看当前主机的主机名称:sudo /bin/hostname使用下面的命令来设置当前主机的主机名称:sudo /bin/hostname newname系统启动时,它会从/etc/hostname来读取主机的名称.DNS配置文件首先,你可以在/etc/hosts中加入一些主机名称和这些主机名称对应的IP地址,这是简单使用本机的静态查询.要访问DNS 服务器来进行查询,需要设置/etc/resolv.conf文件.sudo vi /etc/resolv.confnameserver 202.96.128.68nameserver 61.144.56.101nameserver 192.168.8.220/重新设置网络,以启用新设置sudo /etc/init.d/networking restartok如果你喜欢用其他的记事本编辑器例如gedit等那就把其中命令中的vi换成gedit就可以了。

⑶ 修改Ubuntu配置文件已达到修改静态IP地址

通过修改系统配置文件配置静态IP等网络参数方法:ubuntu的网络配置文件是:/etc/network/interfacesubuntu命令行修改网络配置方法/etc/network/interfaces打开后里面可设置DHCP或手动设置静态ip。前面auto eth0,让网卡开机自动挂载.1. 以DHCP方式配置网卡编辑文件/etc/network/interfaces:sudo vi /etc/network/interfaces并用下面的行来替换有关eth0的行:# The primary network interface – use DHCP to find our addressauto eth0iface eth0 inet dhcp用下面的命令使网络设置生效:sudo /etc/init.d/networking restart也可以在命令行下直接输入下面的命令来获取地址sudo dhclient eth02. 为网卡配置静态IP地址编辑文件/etc/network/interfaces:sudo vi /etc/network/interfaces并用下面的行来替换有关eth0的行:# The primary network interfaceauto eth0iface eth0 inet staticaddress 192.168.3.90gateway 192.168.3.1netmask 255.255.255.0#network 192.168.3.0#broadcast 192.168.3.255将上面的ip地址等信息换成你自己就可以了.用下面的命令使网络设置生效:sudo /etc/init.d/networking restart3. 设定第二个IP地址(虚拟IP地址)编辑文件/etc/network/interfaces:sudo vi /etc/network/interfaces在该文件中添加如下的行:auto eth0:1iface eth0:1 inet staticaddress 192.168.1.60netmask 255.255.255.0network x.x.x.xbroadcast x.x.x.xgateway x.x.x.x根据你的情况填上所有诸如address,netmask,network,broadcast和gateways等信息.用下面的命令使网络设置生效:sudo /etc/init.d/networking restart4. 设置主机名称(hostname)使用下面的命令来查看当前主机的主机名称:sudo /bin/hostname使用下面的命令来设置当前主机的主机名称:sudo /bin/hostname newname系统启动时,它会从/etc/hostname来读取主机的名称.关于设置主机名称的更多信息,请访问这里5. 配置DNS首先,你可以在/etc/hosts中加入一些主机名称和这些主机名称对应的IP地址,这是简单使用本机的静态查询.要访问DNS 服务器来进行查询,需要设置/etc/resolv.conf文件.假设DNS服务器的IP地址是192.168.3.2, 那么/etc/resolv.conf文件的内容应为:search test.comnameserver 192.168.3.2附网卡设置相关命令:查看网卡信息: ifconfig设定一个网卡IP:ifconfig eth1 192.168.1.10 netmask 255.255.255.0 重启网卡使设定生效:sudo /etc/init.d/networking restart更改MAC地址:ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx查看路由相关信息:route -n

⑷ 怎么配置ubuntu的网络配置

方法一.使用图行界面设置,这个最简单。IP,子网掩码,网关,DNS都可以轻松设置。永久保存。方法二,采用命令方式,临时修改网卡IP和子网掩码,重启网络后会丢失。$sudo ifconfig eth0 192.168.1.1 netmask 255.255.255.0查看网关,命令$route -n修改网关$sudo route add default gw 192.168.0.1查看DNS,使用nm-tool命令$ns-tool方法三,修改网卡的配置文件,这个是最主要的方式,可以永久保存。注意不是/etc/resolv.conf,而是/etc/network/interfaces文件。输入命令$sudo nano /etc/network/interfaces输入:auto eth0iface eth0 inet staticaddress 192.168.1.100netmask 255.255.255.0gateway 192.168.1.1Ctrl+x保存退出输入命令$sudo nano /etc/resolvconf/resolv.conf.d/base修改DNS

⑸ ubuntu网络配置文件中的 AUTO LO是指的什么网卡

不是。是本地回环地址,是你ping 127.0.0.1时用到的。

⑹ ubuntu网卡文件位置

1.修改网卡名称:ens3=>eth0步骤1:首先切换到 root 账号,然后 vi /etc/default/grub;步骤2:修改参数 GRUB_CMDLINE_LINUX 添加 net.ifnames=0 biosdevname=0;步骤3:然后保存文件,执行命令update-grub步骤4:编辑文件 /etc/network/interface 保存后重启ubuntu步骤5:最后验证是否修改成功2.设置eth0#sudo nano /etc/network/interfaces #编辑网网卡配置文件auto loiface lo inet loopbackauto eth0 #开机自动连接网络iface eth0 inet static #static表示使用固定ip,dhcp表述使用动态ipaddress 192.168.1.168 #设置ip地址netmask 255.255.255.0 #设置子网掩码gateway 192.168.1.1 #设置网关3. 为网卡配置静态IP地址编辑文件/etc/network/interfaces:sudo nano /etc/network/interfaces并用下面的行来替换有关eth0的行:# The primary network interfaceauto eth0iface eth0 inet staticaddress 192.168.3.90gateway 192.168.3.1netmask 255.255.255.0将上面的ip地址等信息换成你自己就可以了.用下面的命令使网络设置生效:sudo /etc/init.d/networking restart。4. 设定第二个IP地址(虚拟IP地址)编辑文件/etc/network/interfaces: sudo vi /etc/network/interfaces在该文件中添加如下的行:auto eth0:1iface eth0:1 inet staticaddress 192.168.1.60netmask 255.255.255.0network x.x.x.xbroadcast x.x.x.xgateway x.x.x.x根据你的情况填上所有诸如address,netmask,network,broadcast和gateways等信息。用下面的命令使网络设置生效:sudo /etc/init.d/networking restart。

⑺ 关于Ubuntu网卡配置文件

ubuntu8.10以后用图形配置来网络比文本方便,而且自你还是静态ip就更简单了。在网络设置那里,新建网络atuo eth1填好address netmask gateway还有dns,有多个要加“,”。这样开机就会启动的。

⑻ ubuntu 图形网络配置界面 是哪个文件

进入修复选项, 然后选择一个关于什么 X 什么的,大概就是说修复window X的选项,你应该可以猜出是哪个, 进入那个选项后,有几个选项,用鼠标选择恢复默认设置什么的,大概这个意思,你可以看懂的. 重启,正常进入桌面.

未经允许不得转载:山九号 » ubuntu网络配置文件|修改Ubuntu配置文件已达到修改静态IP地址

赞 (0)