Ubuntu IP是玩家使用电脑的常用软件,接下来我会对Ubuntu IP进行深入的学习和研究,在这里和大家一起探讨Ubuntu IP的使用方法,希望对你有用。Ubuntu IP地址配置。
首先,使用命令设置Ubuntu的IP地址。
1.修改配置文件黑名单。会议禁用IPV6:sudo VI/etc/modprobe。d/黑名单。会议
2.在文档末尾添加黑名单ipv6,然后查看修改结果:cat/etc/modprobe . d/black list . conf。
3.设置Ubuntu IP(设置网卡eth0的IP地址和子网掩码)sudo ifconfig eth0 192.168.2.1网络掩码255.255.255.0。
4.Ubuntu IP Settings Gateway sudo Routing Add Default Gateway 192.168.2.254
6. Restart the network service (if not, please restart Ubuntu: sudo reboot): sudo/etc/init.d/network restart.
7.查看当前Ubuntu IP:ifconfig
第二,直接修改Ubuntu IP系统配置文件。
1.通过DHCP配置网卡。
# Theprimarynetworkinterface-usedhcptofindoraddress auto eth 0 if ace eth 0 inet DHCP用下面的命令使网络设置生效:
sudo/etc/init . d/networking restart也可以直接在命令行输入以下命令来获取地址sudo dhclient eth0。
2.为网卡配置静态Ubuntu IP地址。
# Main Network Interface Automatic Ethernet 0 Interface 0 Static Address 192.168.2.1 Gateway 192.168.2.254 Network Mask 255.255.0 # Network 192. 168. 2. 0 # Broadcast 192.168.2.255 Replace the above Ubuntu IP address and other information with yours. Use the following command to make the network settings take effect:
sudo/etc/init。d/网络重启3 .设定第二个Ubuntu IP地址(虚拟互联网协议(互联网协议)地址)
Autoeth 0:1 iface eth 0:1 network static address x.x.x.x network x.x.x broadcast x.x.x.x gateway x.x.x.x fill in all information such as address, network mask, network, broadcast and method according to your situation: use the following command to make the network settings effective: sudo/.
4.设置主机名(hostname)使用以下命令查看当前主机的主机名:sudo /bin/hostname使用以下命令设置当前主机的主机名:sudo /bin/hostname newname当系统启动时,它将从/etc/hostname中读取主机名。
5.配置DNS
6. Manually restart the network service: sudo/etc/init. d/network restart.
The returned results are as follows: * Reconfigure the network interface . [OK]