Ubuntu – E: Type ‘“ndeb’ is not known on line 7 in source list /etc/apt/sources.list

aptfirefox

I want to install Firefox, so I copy and pasted this command in terminal:

echo -e “\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main” | tee -a /etc/apt/sources.list > /dev/null

But I got an error:

E: Type '“ndeb' is not known on line 7 in source list /etc/apt/sources.list

How can I fix this?

Best Answer

Those quotes (“\ndeb...) are Unicode "pretty" quotes, not the normal "". Therefore, echo -e didn't work as expected, since bash, without quotes, took \n and converted it to n, which echo printed as-is.

Delete that line:

sed -i '/mozilla/d' /etc/apt/sources.list

And now run that command with normal quotes:

echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | tee -a /etc/apt/sources.list > /dev/null

Though I don't know why you want do this. Firefox is installed by default, and even if it wasn't, is available in the official repositories, and well-updated. Just do sudo apt-get install firefox.