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

Tutorial on installing Android Studio on Ubuntu 19 and below

Based on past experience, taking notes after comp...

Vue implements a simple marquee effect

This article shares the specific code of Vue to a...

The difference between div and table in speed, loading, web application, etc.

1: Differences in speed and loading methods The di...

Detailed explanation of filters and directives in Vue

Table of contents vue custom directive Global Dir...

How to modify the scroll bar style in Vue

Table of contents First of all, you need to know ...

Detailed explanation of common usage methods of weixin-js-sdk in vue

Link: https://qydev.weixin.qq.com/wiki/index.php?...

Why MySQL database avoids NULL as much as possible

Many tables in MySQL contain columns that can be ...

Sample code for implementing 3D rotation effect using pure CSS

Mainly use the preserve-3d and perspective proper...

CentOS7 64-bit installation mysql graphic tutorial

Prerequisites for installing MySQL: Install CentO...

How to use tcpdump to capture packets in Linux system

Let me look at the example code first: 1. Common ...

MySQL 8.0 New Features - Introduction to Check Constraints

Table of contents Preface Check Constraints Creat...

Use of Linux ifconfig command

1. Command Introduction The ifconfig (configure a...

Implementation of k8s deployment of docker container

Environment: (docker, k8s cluster), continue with...

Detailed analysis of classic JavaScript recursion case questions

Table of contents What is recursion and how does ...