Linux Ping error name or service not known

forget to set DNS after setting static IP, ping error: Name or service not known
add DNS to

vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

Read More: