Allow apt-get to connect to Internet (Kali Linux)

While performing an apt-get update with Kali Linux, packages cannot be retrieved, but a ping works. sources.list file needs to be setup. To fix it in a terminal: Type sudo -iType touch /etc/apt/sources.listType chmod 644 /etc/apt/sources.listType echo "deb kali-rolling main contrib non-free" > /etc/apt/sources.listType apt-key adv --keyserver hkp:// --recv-keys 7D8D0BF6Type apt-get updateGood to go.