Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Changing my Debian mirror
-
- Posts: 4
- Joined: 2017-04-24 17:48
Changing my Debian mirror
My network has slowed down. I found out that it was the server. so i found a better mirror using 'netselect-apt'. But i don't know how to add that to the '/etc/apt/sources.list'. I have tried the cat command but it doesn't seem to work. when i 'apt-get update' the old mirror was not replaced. So i would like know how to change the mirror server.
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Changing my Debian mirror
Interesting user name, and welcome to the forum,...
How to edit the sources.list file on Debian
================
1st hit : https://wiki.debian.org/SourcesList
There also is this command :
It will give you the manual, which is full of details.
In a nut shell, it is simple enough.
To edit the sources.list file and add a new source/mirror to it, or change the
others,.
You must use "su", or "sudo", "gksudu", or something that gives you root privileges,..
'cd' to /etc/apt ,
then use any editor you like, but it is best to use vi or nano (in my opinion),
open the sources.list file, edit as desired, adding the additional mirror, etc.
The above links give more details and some examples of what the source lines
should look like.
When you have finished, and save the file, you do need to run
or
first, to update the sources.
Any way, that is how I edit mine, there may be other ways as well.
How to edit the sources.list file on Debian
================
1st hit : https://wiki.debian.org/SourcesList
There also is this command :
Code: Select all
man sources.list
In a nut shell, it is simple enough.
To edit the sources.list file and add a new source/mirror to it, or change the
others,.
You must use "su", or "sudo", "gksudu", or something that gives you root privileges,..
'cd' to /etc/apt ,
then use any editor you like, but it is best to use vi or nano (in my opinion),
open the sources.list file, edit as desired, adding the additional mirror, etc.
The above links give more details and some examples of what the source lines
should look like.
When you have finished, and save the file, you do need to run
Code: Select all
apt-get update
Code: Select all
apt update
Any way, that is how I edit mine, there may be other ways as well.
"What we expect you have already Done"
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Changing my Debian mirror
The current advice is to use deb.debian.org, full details here:
http://deb.debian.org/
I recommend installing apt-transport-https and using the https lines, it works very well in my stretch systems.
http://deb.debian.org/
I recommend installing apt-transport-https and using the https lines, it works very well in my stretch systems.
deadbang
-
- Posts: 4
- Joined: 2017-04-24 17:48
Re: Changing my Debian mirror
I am glad. Thanks.
I did try to edit the file /etc/apt/sources.list manually using gedit but it managed to disrupt the whole file, luckily i made a copy of the file before making the changes (so i can revet back). I tried
$ cp /sources.list/etc/apt/sources.list
$ mv /sources.list/etc/apt/sources.list
$ cat /sources.list/etc/apt/sources.list
didn't help either.
I found this and it seemed to work
$ netselect-apt stable -n -o /etc/apt/sources.list
but the usual
#This is a comment
deb http://ftp.us.debian.org/debian/ wheezy main
deb-src http://ftp.us.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
deb http://ftp.us.debian.org/debian wheezy-updates main
deb-src http://ftp.us.debian.org/debian wheezy-updates main
was changed into
# Debian packages for stable
deb http://ftp.sg.debian.org/debian/ stable main contrib
# Uncomment the deb-src line if you want 'apt-get source'
# to work with most packages.
# deb-src http://ftp.sg.debian.org/debian/ stable main contrib
# Security updates for stable
deb http://security.debian.org/ stable/updates main contrib
Should i worry about it?
I did try to edit the file /etc/apt/sources.list manually using gedit but it managed to disrupt the whole file, luckily i made a copy of the file before making the changes (so i can revet back). I tried
$ cp /sources.list/etc/apt/sources.list
$ mv /sources.list/etc/apt/sources.list
$ cat /sources.list/etc/apt/sources.list
didn't help either.
I found this and it seemed to work
$ netselect-apt stable -n -o /etc/apt/sources.list
but the usual
#This is a comment
deb http://ftp.us.debian.org/debian/ wheezy main
deb-src http://ftp.us.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
deb http://ftp.us.debian.org/debian wheezy-updates main
deb-src http://ftp.us.debian.org/debian wheezy-updates main
was changed into
# Debian packages for stable
deb http://ftp.sg.debian.org/debian/ stable main contrib
# Uncomment the deb-src line if you want 'apt-get source'
# to work with most packages.
# deb-src http://ftp.sg.debian.org/debian/ stable main contrib
# Security updates for stable
deb http://security.debian.org/ stable/updates main contrib
Should i worry about it?
- dilberts_left_nut
- Administrator
- Posts: 5347
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 13 times
- Been thanked: 66 times
Re: Changing my Debian mirror
If you're running wheezy (which is oldstable), then yes.
Your new sources.list points to 'stable' - currently jessie and soon to be stretch, so surprise upgrades and likely borkage is in your immediate future.
Your new sources.list points to 'stable' - currently jessie and soon to be stretch, so surprise upgrades and likely borkage is in your immediate future.
The file you want to back up and edit is /etc/apt/sources.list - correct paths (and spaces) are required - along with being root (as it is a system file that your regular user should not be messing with:ExpertLearner wrote:I tried
$ cp /sources.list/etc/apt/sources.list
$ mv /sources.list/etc/apt/sources.list
$ cat /sources.list/etc/apt/sources.list
Code: Select all
$ su
Password: <enter root password>
# cp /etc/apt/sources.list /etc/apt/sources.list.bak
# nano /etc/apt/sources.list
AdrianTM wrote:There's no hacker in my grandma...
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Changing my Debian mirror
If you use this command to edit /etc/apt/sources.list, the file will be checked for errors before saving:
Code: Select all
# apt edit-sources
deadbang
-
- Posts: 4
- Joined: 2017-04-24 17:48
Re: Changing my Debian mirror
When I did that
it just took me to the editor (i e)it asked me to choose between 3 editors and i chose nano, it opened the sources.list for me.
Code: Select all
$ apt edit-sources