How to install dotnet SDK on Ubuntu 16.04 LTS

Ensure you're running the prerequisite commands also:

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'

And finally:

sudo apt-get update
sudo apt-get install dotnet-sdk-2.1.4

Try running this command on your terminal:

wget -q packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

Then update your system:

sudo apt-get update

Finally, run the command to install .NET

sudo apt-get install dotnet-sdk-2.1.4

Hope that helps!