Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

ubuntu set dns terminal

echo nameserver 8.8.8.8 | sudo tee /etc/resolv.conf
Comment

ubuntu dns config

#First install resolvconf if not installed
sudo apt update
sudo apt install resolvconf

## check resolvconf service started and enabled
sudo systemctl status resolvconf.service

## if service is not enabled you can start and enable it with
sudo systemctl start resolvconf.service
sudo systemctl enable resolvconf.service
## now edit resolv.conf.d/head configuration file
sudo nano /etc/resolvconf/resolv.conf.d/head

## I use ubuntu 20.04 and unfortunately non of the other answers worked for me so I share the way I fixed this problem

first install resolvconf if not installed

sudo apt update
sudo apt install resolvconf
check resolvconf service started and enabled

sudo systemctl status resolvconf.service
if service is not enabled you can start and enable it with :

sudo systemctl start resolvconf.service
sudo systemctl enable resolvconf.service
now edit resolv.conf.d/head configuration file

sudo nano /etc/resolvconf/resolv.conf.d/head
##add your DNS addresses to this file for example I use (8.8.8.8 and 8.8.4.4)
nameserver 8.8.8.8 
nameserver 8.8.4.4
Comment

PREVIOUS NEXT
Code Example
Shell :: scp from remote to local 
Shell :: conda correct install opencv 
Shell :: delete directory mac terminal 
Shell :: how to install bootstrap in angular 
Shell :: deleting remote branch in GitHub 
Shell :: Input is required, but Expo CLI 
Shell :: edit crontab daily 
Shell :: enable virtualization mac pro 
Shell :: fix read only file system 
Shell :: grep v multiple word 
Shell :: volver a commit anterior temporal 
Shell :: Merging multiple kube config files in to one 
Shell :: how to get last in array jq 
Shell :: move view vim 
Shell :: install yarn 
Shell :: kubectl exec bash 
Shell :: ubuntu run in port 80 
Shell :: how to open appimage in linux 
Shell :: create jar with maven commandline 
Shell :: i have installed android studio but is not showing in flutter doctor 
Shell :: Failed to install the following Android SDK packages as some licences have not been accepted. 
Shell :: Kali - How to Uninstall Software on Kali Linux 
Shell :: git push u origin master 
Shell :: how to update git in vscode 
Shell :: brew in mac 
Shell :: git uncommit last commit but keep changes 
Shell :: install pip linux 
Shell :: clean journal 
Shell :: git push reset 
Shell :: start Gui on your Ubuntu 20.04 system from cli 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =