web123456

Linux IP appears inet6 addr:fe80::20c:29ff:fe47:fd61/64 scope:l

Don’t worry about this situation often (inet6 addr :fe80::20c:29ff:fe47:fd61/64 scope:link1). Try this method. This is also something I have tortured for many days. Don’t criticize if you don’t like it. Thank you.

Virtual machine settings permissions: sudo chown book:book fs_mini_mdev -R

Virtual machine change IP: ifconfig eth0 192.168.0.22


1. Dynamic IP address

You can modify /etc/network/interfaces file to dynamically allocate IP addresses

auto lo

iface lo inet loopback

auto eth3 

iface  eth3  inet  dhcp

After each startup, the router assigns an IP address, then use the ifconfig command to view the current IP address, and then use the sudo ifconfig eth3  192.168.*.*** command to set the IP address to the planned value.

eg:book@book-desktop:~$ ifconfig

book@book-desktop:~$ sudo  ifconfig  eth3  192.168.1.184


2. Static IP address

If you enter the method of sudo  ifconfig eth0 192.168.*.*** in the terminal, it is just that the current login is valid. You can modify the /etc/network/interfaces file to achieve a fixed IP address every time you boot.

book@book-desktop:~$ sudo  gedit  /etc/network/interfaces

Add settings for eth0.

auto lo

iface lo inet loopback

auto eth0

iface  eth0  inet  static

address  192.168.0.***

gateway  192.168.0.1

netmask  255.255.255.0

Among them, static is a static IP, set the IP address to 192.168.0.***, gateway network management bit 192.168.1.1, and netmask subnet mask bit 255.255.255.0.

Press ctrl + s to save the settings, and ctrl + q to exit the settings of gedit.


3. Restart the network card and restart the network service

Turn off first and then turn on the network card, and restart the network service.

sudo  ifconfig  eth0  down

sudo  ifconfig  eth0  up

sudo  /etc//networking  restart

After restarting the network service, enter the Ifconfig command in the terminal to verify whether the ip address is modified successfully.


4. Turn off the firewall of ubuntu

Use the sudo ufw disable command to close the firewall of ubuntu.

book@book-desktop:~$ sudo ufw disable

Firewall stopped and disabled on system startup


This article is permanently updated with address:/linux/