Sorry, I don't have enough reputation to comment yet, so I have to post this as an answer. I will edit this to contain the answer when we find it. Do you mean that you replaced the Windows in Surface Pro 3 with Windows or that you are using Windows 10 with the Windows Feature called Windows Subsystem for Linux (Beta), which is based on Ubuntu? Or did you buy it e.g. used with Ubuntu installed (or does MS even sell it that way)? Were you running a previous Ubuntu version in the device before and it had DNS working?
The problem might have something to do with that Ubuntu 17.04 has switched into using systemd-resolved as the default DNS resolver.
Try first updating to the latest packages using the terminal just in case there is a fix affecting the problem:
sudo apt-get update
If you are using Wi-Fi, have you tried installing the driver like this (the suggestion is from How to install Linux on Surface Pro 3, but I replaced git.marvell.com with the current IP 126.96.36.199 for opensource.marvell.com):
sudo git clone git://188.8.131.52/mwifiex-firmware.git
sudo mkdir -p /lib/firmware/mrvl/
sudo cp mwifiex-firmware/mrvl/* /lib/firmware/mrvl/
If you don't have git installed, sudo says "sudo: git: command not found". In that case, install git and try again:
sudo apt-get install git
After that, the command beginning with "sudo git clone" should say "Cloning into 'mwifiex-firmware'" i.e. it downloads the driver into such a subdirectory of ~/Downloads. After performing the third command beginning with "sudo cd", try rebooting your machine.
What does Ubuntu show as "IPv4 Address", "IPv6 Address", "Default Route" and most importantly "DNS" when you go to System Settings > Network in the desktop GUI?
Alternatively, could you please first run this to print your default gateway value and paste it here:
route | grep default
Also try performing a DNS query using these and paste us the result:
nslookup should show your primary nameserver address in the Server field and
dig in the SERVER field.
If the nameserver address shown by
dig is correct, viz. usually one of your ISP's nameservers, something could be blocking the DNS query commands. If you have connected through an active network device such as a dsl router or cable modem, it might theoretically have DNS access blocked in it's firewall, although that is not very likely, especially since I assume you had DNS working in your device before.
You can also try this to show your IP address configuration, although you should at least be getting an IP since SSH works (I recommend omitting any field containing the colon (:) i.e. the MAC address for security purposes)?
ip addr show