<div dir="rtl" align="right">

<p dir="rtl" align="center">بسم الله الرحمن الرحیم </p>

حل مشکل Temporary failure resolving هنگام آپدیت در Ubuntu

<div dir="ltr" align="left" style="background-color:black;color:white">
<p style="background-color:black;color:white;">

<code>
Err:1 http://security.ubuntu.com/ubuntu xenial-security InRelease Temporary failure resolving ‘security.ubuntu.com’
Err:2 http://archive.ubuntu.com/ubuntu xenial InRelease Temporary failure resolving ‘archive.ubuntu.com’
Err:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease Temporary failure resolving ‘archive.ubuntu.com’Reading package lists… DoneW: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving ‘archive.ubuntu.com'W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Temporary failure resolving ‘archive.ubuntu.com'W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Temporary failure resolving ‘security.ubuntu.com'W: Some
index files failed to download.
They have been ignored, or old ones used instead
...
</code>

</p>
</div>

دستور زیر را در خط فرمان اجرا کنید:

<div dir="ltr" align="left">

```r
sudo nano /etc/resolv.conf
```

</div>

nameserver را تغییر دهید و یا کپی کنید:

<div dir="ltr" align="left">

```r
nameserver 8.8.8.8
nameserver 4.2.2.4
```

</div>

یا به طور خلاصه در یک خط:

<div dir="ltr" align="left">

```r
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
```

</div>

<p dir="rtl" align="center">صلوات</p>

</div>
