---
title: "Cách đổi DNS trong Ubuntu"
description: "Mở file /etc/resolv.conf và thêm dns..."
date: "2021-01-31"
author:
  name: "Nguyen Pham"
  role: "Xin chào. Mình thích lập trình và công nghệ. Đây là blog mình chia sẻ lại các kiến thức về lập trình, công nghệ."
  avatar: "http://0.gravatar.com/avatar/6fb61398e24046b34e13870dd6c357b9?s=128&d=mm&r=g"
category: "Ubuntu"
tags: ["Ubuntu", "dns", "internet", "network"]
coverImage: "/blog/covers/cach-doi-dns-trong-ubuntu.png"
featured: false
readingTime: "1 min read"
---

Bước 1: Mở file **/etc/resolv.conf**

```
sudo vim /etc/resolv.conf
```

Bước 2: thay thế dns.

```
# ip v4
nameserver 1.1.1.1
nameserver 8.8.8.8
# ip v6
nameserver 2606:4700:4700::1111
nameserver 2606:4700:4700::1001
```

Bước 3: Lưu file lại.
