- Rename 'sources.list':
sudo mv /etc/apt/sources.list /etc/apt/sources.offical
-
Store Different Mirrors:
- You can store different mirror configurations in files named
/etc/apt/sources.offical.<something>
, where<something>
is a descriptive name for the mirror. For example:/etc/apt/sources.offical.us
/etc/apt/sources.offical.eu
/etc/apt/sources.offical.asia
- You can store different mirror configurations in files named
-
Create a Symbolic Link for
mirror.py
:-
To make
mirror.py
executable from anywhere, you can create a symbolic link to it in a directory that is included in yourPATH
. A common choice is/usr/local/bin
. -
First, ensure that
mirror.py
has executable permissions:chmod +x /path/to/mirror.py
-
Then, create the symbolic link:
sudo ln -s /path/to/mirror.py /usr/local/bin/mirr
-
Verify the symbolic link:
ls -l /usr/local/bin/mirror
The output should look like this:
lrwxrwxrwx 1 root root 21 Sep 26 20:05 /usr/local/bin/mirror -> /path/to/mirror.py
-
-
Test the Script:
-
You can now run the
mirror
command from anywhere to executemirror.py
:sudo mirr
-