Hi I'm completely new to linux and try to configure my Ubuntu 16.04 server. I managed to ssh to the server using public keys yesterday and installed some packages like zsh,... on my server but today all apt-get commands fail with error "unable to locate package" and even pings fail with error "ping: unknown host google.com"

TRACEROUTE package is not installed and as I said before apt-get isn't able to locate the packages

the ifconfig output:

ifconfig ens32 Link encap:Ethernet HWaddr 00:50:56:03:b0:75
inet addr: Bcast: Mask: inet6 addr: fe80::250:56ff:fe03:b075/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:213276 errors:0 dropped:0 overruns:0 frame:0 TX packets:2739 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:13111345 (13.1 MB) TX bytes:286687 (286.6 KB) lo Link encap:Local Loopback
inet addr: Mask: inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:22952 errors:0 dropped:0 overruns:0 frame:0 TX packets:22952 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:1702464 (1.7 MB) TX bytes:1702464 (1.7 MB)

  • Can you show the output of a traceroute and an ifconfig? – The Pizza Overlord Jul 27 '17 at 10:26
  • For consistency, can you please format those results correctly and add them to the question you asked, as well as the traceroute results requested? – The Pizza Overlord Jul 27 '17 at 10:43

I finally figured out that somehow after each reboot nameserver line in resolve.conf is getting erased. and adding the namesaver back fixed my problem.

  • Add dns-nameservers to your configuration in /etc/network/interfaces if you're using that to configure. Don't just drop things into the /etc/resolv.conf file as that has a tendency to be overwritten at times. – Thomas Ward Jul 27 '17 at 12:19
  • Maybe you should post your network settings. Your network mask of and same IP and broadcast already look a bit weird. Sure you have a gateway set up? – CatMan Jul 27 '17 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.