Ubuntu can use apt-get to get system or software updates, and download these updates from the network to install on the computer. In fact, Ubuntu users can also choose to download these updates on the IPv4 or IPv6 channel. Here's how to choose IPv4 or IPv6 channels when Ubuntu uses apt-get updates.
ForceIPv4: Global forced to use the IPv4 protocol to download
ForceIPv6: Global forced to use the IPv6 protocol to download
Of course, if you want to use IPv6, then you need operator And router support, and the correct configuration on the operating system.
Method 1: Manually specify
apt-get globally using the IPv4 example
1.sudo apt-get -o Acquire::ForceIPv4=true install pkg
2.sudo apt-get -o Acquire::ForceIPv4=true update
3.sudo apt-get -o Acquire::ForceIPv4=true upgrade
4.sudo apt-get -o Acquire::ForceIPv4=true dist-upgrade
5.sudo apt-get -o Acquire::ForceIPv4=true install XXX
apt-get global IPv6 example
1.sudo apt-get -o Acquire::ForceIPv6=true install pkg
2.sudo apt-get -o Acquire::ForceIPv6=true update
3.sudo apt- Get -o Acquire::ForceIPv6=true upgrade
4.sudo apt-get -o Acquire::ForceIPv6=true dist-upgrade
5.sudo apt-get -o Acquire:: ForceIPv6=true install XXX
Method 2: Configure Bash Alias
If you don't want to lose this time every time, you can directly change the Bash Shell configuration file ~/.bashrc
## makes Using IPv6 ##
#alias apt-get=‘sudo apt-get -o Acquire::ForceIPv6=true’
## Using IPv4 ##
alias Apt-get=‘sudo apt-get -o Acquire::ForceIPv4=true’
Method 3: Create an apt-get configuration file
If you want apt-get to force IPv6 Create the following configuration file
/etc/apt/apt.conf.d/1000-force-ipv6-transport
and fill in the contents of it
Acquire::ForceIPv6 “true”;
If you want apt-get to force IPv4, you can create the following configuration file
etc/apt/apt.conf.d/1000-force-ipv4-transport
and fill in the contents of it
Acquire::ForceIPv4 “true”;
The above is how Ubuntu uses IPv4 or IPv6 channels when updating with apt-get. No choice, then apt-get defaults to downloading update files using the IPv4 protocol.
In Linux operation, sometimes changing the user password will appear it is based on a dictionary wor
Recently, users have reported that the Ubuntu system installed in the virtual machine found that the
Among the many commands in Unix, some commands are often used, and some commands ar
Most users now use Windows systems. They all know that Windows systems are divided
Unix uninstall gdb debugging tools trick
Introduction to grep regular expressions in Linux system
Linux system Linode can not start iPtables how to do?
How to display the number of Linux subfolders and files
What should I do if Linux vi is stuck?
How does Linux modify the RPM installation directory?
Linux Container File System Step
Linux installation using the monitoring software Collectl method
Linux vim shows utf-8 document garbled how to do?
How to recover Ubuntu's Grub boot by UEFI?
Tips for using timed commands in Linux systems
Linux mint how to solve the problem of no sound in the root login
How to slap the card? Scorpio card knife game tutorial Raiders
How to configure the desktop environment in Windows XP
Five major operational tips to avoid server migration risks
Computer 38 blue screen analysis Daquan
Win10 system can not boot prompt error 0xc00000e9 how to solve
Win7 system how to clear 360 browser cache
How to enable the tutorial for the new start screen in Win10 build 9879
Stepping up the FTP server program through IIS Step
Microsoft "Next-generation Windows operating system" naming mystery