Ubuntu System assigned Fixed ip--

Source: Internet
Author: User

Ubuntu system assigns fixed IP

Inputsudo vim /etc/network/interfaces

Add the following to the content (the original content needs to be emptied)

auto ens33 iface ens33 inet static address 192.168.219.100 netmask 255.255.255.0 gateway 192.168.219.2 dns-nameservers 192.168.219.2

Here's a detailed explanation.

auto ens33 iface ens33 inet static # 分配的 固定 ip 192.168.219是根据你的虚拟网卡来决定的,在第一步里面已经分配了 address 192.168.219.100 # 子网掩码 固定的 netmask 255.255.255.0 # 网关 默认都是 x.x.x.2 但是 windows 下的 vm 可以自己设置,mac 上我没有找到 gateway 192.168.219.2 # dns 输入和网关一样的即可 dns-nameservers 192.168.219.2

Just restart the network when you're done

sudo /etc/init .d /networking restart

Ubuntu System assigned Fixed ip--

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.