Solution to Ubuntu not being able to connect to the Internet

Solution to Ubuntu not being able to connect to the Internet

Problem description:

I used a desktop computer and the campus network to access the Internet via wired mode. I tested 64-bit Ubuntu 14.04.4, Ubuntu 14.04.5, and Ubuntu 16.04.3, and all of them had the following problems:

The network shows that it is connected, but it cannot access the Internet:

This situation often occurs in some occasions where you need to log in to the Internet, such as schools. Of course, if this error occurs when you do not want to log in to the network, you can also try the following solutions:

1. Click the edit connection in the above picture and set the static IP, as shown in the figure below:

2. Press Ctrl+Alt+T to open the terminal and configure DNS as follows:

(1) sudo nano /etc/network/interfaces and add dns-nameserver 114.114.114.114 at the end

(2) sudo nano /etc/resolvconf/resolv.conf.d/base and add nameserver 114.114.114.114 at the end

(3) sudo nano /etc/resolv.conf and add nameserver 114.114.114.114 at the end

3. Restart the network and the problem is solved! ! ! !

sudo service networking restart

explain:

DNS stands for Domain Name System, and its function is to convert domain names into specific IP addresses.

Commonly used DNS:

  • 8.8.8.8——The IP address of the free DNS server provided by Google (if we want to access Google, we can consider changing the DNS to 8.8.8.8, hehe)
  • 114.114.114.114——DNS commonly used by domestic users to access the Internet
  • 223.5.5.5——AliDNS. Ali Public DNS is a DNS recursive resolution system launched by Alibaba Group. Its goal is to become an integral part of the domestic Internet infrastructure and provide "fast", "stable" and "intelligent" free DNS recursive resolution services to Internet users.

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of how to build an Ftp server on Ubuntu (success guaranteed)
  • How to decompile android apk in ubuntu environment
  • Detailed configuration of wireless network card under Ubuntu Server
  • VMware workstation 12 install Ubuntu 14.04 (64 bit)
  • VMware Workstation 14 Pro installation Ubuntu 16.04 tutorial
  • Solution to the problem that Ubuntu cannot connect to the Internet in the virtual machine
  • Ubuntu16.04 builds php5.6 web server environment
  • How to build nfs service in ubuntu16.04
  • How to modify the time zone and time in Ubuntu system
  • Solution to no Chinese input method in Ubuntu

<<:  MySQL Community Server 5.7.19 Installation Guide (Detailed)

>>:  Vue implements the product tab of the product details page function

Recommend

Learn about TypeScript data types in one article

Table of contents Basic Types any type Arrays Tup...

A brief analysis of the responsiveness principle and differences of Vue2.0/3.0

Preface Since vue3.0 was officially launched, man...

A detailed introduction to setting up Jenkins on Tencent Cloud Server

Table of contents 1. Connect to Tencent Cloud Ser...

Vue realizes the function of book shopping cart

This article example shares the specific code of ...

Sample code for implementing PC resolution adaptation in Vue

Table of contents plan Install Dependencies Intro...

How MySQL uses transactions

Basics A transaction is an atomic operation on a ...

MySQL Order By Multi-Field Sorting Rules Code Example

Say it in advance On a whim, I want to know what ...

wget downloads the entire website (whole subdirectory) or a specific directory

Use wget command to download the entire subdirect...

How to use nginx to block a specified interface (URL)

1. Introduction Sometimes, after the web platform...

Add unlimited fonts to your website with Google Web Fonts

For a long time, website development was hampered...

Detailed explanation of how two Node.js processes communicate

Table of contents Preface Communication between t...

The principles and defects of MySQL full-text indexing

MySQL full-text index is a special index that gen...

Three ways to delete a table in MySQL (summary)

drop table Drop directly deletes table informatio...