Debian 9 Stable ("stretch") Repository Configuration
This post is based on one of my Gists in GitHub. Normally, when you install Debian Stable from DVD or USB, it defaults all package installs from installation media. This is not desirable when we have a fast internet connection and we don't want to be limited by the package selection available in the installation media.
With this snippet, we also enable
non-free packages to be installed in our new Debian system.
First, we need to edit
/etc/apt/sources.list from console:
sudo nano /etc/apt/sources.list
Inside nano text editor, remove all file contents and replace them with this:
# Official Debian Repos (US Mirrors) # deb http://ftp.us.debian.org/debian/ stretch main contrib non-free deb http://ftp.us.debian.org/debian/ stretch-updates main contrib non-free # Debian Security Updates # deb http://security.debian.org/ stretch/updates main contrib non-free # Debian Backports # deb http://ftp.debian.org/debian stretch-backports main
USEFUL ADVICE: You can copy and paste in GNU/Linux terminal with
You can replace the US mirror URLs with some local mirrors, here's some mirrors by country:
You can get the full Debian Repo Mirror List on https://www.debian.org/mirror/list
Save the file with
CTRL+O and close it with
Now run the following command to load your new repo list:
sudo apt-get update
I hope this can help someone!