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

Detailed explanation of MySql data type tutorial examples

Table of contents 1. Brief Overview 2. Detailed e...

In-depth analysis of Linux NFS mechanism through cases

Continuing from the previous article, we will cre...

Detailed introduction and usage examples of map tag parameters

Map tags must appear in pairs, i.e. <map> .....

How to use Vue to develop public account web pages

Table of contents Project Background start Create...

js to realize the function of uploading pictures

The principle of uploading pictures on the front ...

Recommend a cool interactive website made by a front-end engineer

Website link: http://strml.net/ By Samuel Reed Ti...

Implementing license plate input function in WeChat applet

Table of contents Preface background Big guess Fi...

How to use JavaScript strategy pattern to validate forms

Table of contents Overview Form validation withou...

TypeScript uses vscode to monitor the code compilation process

Install Install ts command globally npm install -...

Sublime / vscode quick implementation of generating HTML code

Table of contents Basic HTML structure Generate s...

js to achieve simple product screening function

This article example shares the specific code of ...

Detailed explanation of the use of Refs in React's three major attributes

Table of contents Class Component Functional Comp...

Ubuntu basic settings: installation and use of openssh-server

Record the installation and use of openssh-server...