No internet connection although shows network connection ubuntu 12.04

Asked by Pablo

Suddenly cannot connect to internet, neither wired nor wireless. Gnome network-manager shows strong signal. So does WICD network-manager. I reviewed instructions by Actionparsnip in response to earlier question (Doesn't connect to internet ethernet or wireless--Ubuntu 12.04 Ubuntu “wicd” package Question #205262. What follows is the result:

I pinged 8.8.8.8 and it responded fine: 64 bytes from 8.8.8.8: icmp_rea=1 ttl=49 time=116ms 10 packets transmitted, 10 received, 0% packet loss.

Then I ran echo "nameserver 8.8.8.8" and got
nameserver 8.8.8.8

Then I ran sudo tee -a /etc/resolv.conf > /dev/null and I got
 sudo: tee-a: orden no encontrada (translated: command not found)

I don't know what to do next.

I am not aware of any conflict with any other equipment.

Thank you for your help

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu wicd Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

Try:

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

Then retry the web

Revision history for this message
Pablo (ceascolombia) said :
#2

Thanks actionparsnip, that solved my question.

Revision history for this message
Pablo (ceascolombia) said :
#3

would you be willing to teach me--give me a hint about why this is happening, why tee worked but tee-a did not, and how I can prevent this problem from recurring in the future?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

The echo gets piped to tee which would overwite the file. tee-a isn't command, tee has an option -a which (a)dds to a file but you missed the space.

Hopefully updates will solve the need to do this