Ubuntu setting IP Address, gateway method

Source: Internet
Author: User

Open Terminal (opened with ctrl+alt+t) 1. Enter Ifconfig print as follows: Enp1s0 Link encap:ethernet HWaddr 6c:4b:90:0b:53:be
inet addr:192.168.1.101 bcast:192.168.1.255 mask:255.255.255.0
Inet6 ADDR:FE80::1FBF:55E3:1C4C:C79D/64 Scope:link
Up broadcast RUNNING multicast mtu:1500 metric:1
RX packets:144897 errors:0 dropped:630 overruns:0 frame:0
TX packets:13548 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13441598 (13.4 MB) TX bytes:1943215 (1.9 MB)
Lo Link encap:local Loopback
inet addr:127.0.0.1 mask:255.0.0.0
Inet6 addr::: 1/128 scope:host
Up LOOPBACK RUNNING mtu:65536 metric:1
RX packets:7441 errors:0 dropped:0 overruns:0 frame:0
TX packets:7441 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 Txqueuelen:1
RX bytes:727906 (727.9 KB) TX bytes:727906 (727.9 KB)

Wlp2s0 Link encap:ethernet HWaddr 34:f6:4b:8e:8e:83
inet addr:192.168.17.208 bcast:192.168.17.255 mask:255.255.255.0
Inet6 ADDR:FE80::7B1:7FD6:CDBC:29A0/64 Scope:link
Up broadcast RUNNING multicast mtu:1500 metric:1
RX packets:39311 errors:0 dropped:0 overruns:0 frame:0
TX packets:34360 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19874047 (19.8 MB) TX bytes:6833538 (6.8 MB)

2. Start setting up IP, gateway, etc. sudo vi /etc/network/interfaces #静态设置IP地址 auto lo  iface lo inet loopback  auto enp1s0
iface enp1s0 inet static          address 192.168.12.89(换成你的IP地址)          netmask 255.255.255.0          gateway 192.168.12.1(换成你的网关) #自动获得IP地址 auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp3. Restart the network card sudo /etc/init .d /networking restartComplete

Ubuntu setting IP Address, gateway method

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.