Skip to main content
Fix and simplify sed command
Source Link
Luc
  • 4k
  • 4
  • 32
  • 41

As mentioned by others, Wi-Fi connection files in system-connections directory have the interface MAC address included. This need to match your current setup hence the procedure is:

  1. copy all files from old machine to new machine from/to directory:

     /etc/NetworkManager/system-connections 
  2. change MAC address entry in each file from old MAC to new MAC. As root:

     cd /etc/NetworkManager/system-connections sed -i -e 's/<old mac>/<new mac>/' * 
  3. Just in case, restart network manager:

     systemctl restart NetworkManager 

Old mac you may check from any of the files you copied, new mac if unsure you can check with ip link (or from the file that likely got created when you installed your system for the connection you used to copy the files).

Note: above assumes you had a single Wi-Fi interface in both your old an new setup, but the same logic should work with multiple interfaces.

As mentioned by others, Wi-Fi connection files in system-connections directory have the interface MAC address included. This need to match your current setup hence the procedure is:

  1. copy all files from old machine to new machine from/to directory:

     /etc/NetworkManager/system-connections 
  2. change MAC address entry in each file from old MAC to new MAC. As root:

     cd /etc/NetworkManager/system-connections sed -i -e 's/<old mac>/<new mac>/ * 
  3. Just in case, restart network manager:

     systemctl restart NetworkManager 

Old mac you may check from any of the files you copied, new mac if unsure you can check with ip link (or from the file that likely got created when you installed your system for the connection you used to copy the files).

Note: above assumes you had a single Wi-Fi interface in both your old an new setup, but the same logic should work with multiple interfaces.

As mentioned by others, Wi-Fi connection files in system-connections directory have the interface MAC address included. This need to match your current setup hence the procedure is:

  1. copy all files from old machine to new machine from/to directory:

     /etc/NetworkManager/system-connections 
  2. change MAC address entry in each file from old MAC to new MAC. As root:

     cd /etc/NetworkManager/system-connections sed -i 's/<old mac>/<new mac>/' * 
  3. Just in case, restart network manager:

     systemctl restart NetworkManager 

Old mac you may check from any of the files you copied, new mac if unsure you can check with ip link (or from the file that likely got created when you installed your system for the connection you used to copy the files).

Note: above assumes you had a single Wi-Fi interface in both your old an new setup, but the same logic should work with multiple interfaces.

As mentioned by others, wifiWi-Fi connection files in system-connectionssystem-connections directory have the interface macMAC address included. This need to match your current setup hence the procedure is:

  1. copy all files from old machine to new machine from/to directory: /etc/NetworkManager/system-connections

    copy all files from old machine to new machine from/to directory:

     /etc/NetworkManager/system-connections 
  2. change MAC address entry in each file from old MAC to new MAC. As root:

    change MAC address entry in each file from old MAC to new MAC. As root:

     cd /etc/NetworkManager/system-connections sed -i -e 's/<old mac>/<new mac>/ * 
  3. Just in case, restart network manager:

     systemctl restart NetworkManager 

cd /etc/NetworkManager/system-connections sed -i -e 's/<old mac>/<new mac>/ *

  1. Just in case, restart network manager:

systemctl restart NetworkManager

Old mac you may check from any of the files you copied, new mac if unsure you can check with ip link (or from the file that likely got created when you installed your system for the connection you used to copy the files).

Note: above assumes you had a single wifiWi-Fi interface in both your old an new setup, but the same logic should work with multiple interfaces.

As mentioned by others, wifi connection files in system-connections directory have the interface mac address included. This need to match your current setup hence the procedure is:

  1. copy all files from old machine to new machine from/to directory: /etc/NetworkManager/system-connections
  2. change MAC address entry in each file from old MAC to new MAC. As root:

cd /etc/NetworkManager/system-connections sed -i -e 's/<old mac>/<new mac>/ *

  1. Just in case, restart network manager:

systemctl restart NetworkManager

Old mac you may check from any of the files you copied, new mac if unsure you can check with ip link (or from the file that likely got created when you installed your system for the connection you used to copy the files).

Note: above assumes you had a single wifi interface in both your old an new setup, but the same logic should work with multiple interfaces.

As mentioned by others, Wi-Fi connection files in system-connections directory have the interface MAC address included. This need to match your current setup hence the procedure is:

  1. copy all files from old machine to new machine from/to directory:

     /etc/NetworkManager/system-connections 
  2. change MAC address entry in each file from old MAC to new MAC. As root:

     cd /etc/NetworkManager/system-connections sed -i -e 's/<old mac>/<new mac>/ * 
  3. Just in case, restart network manager:

     systemctl restart NetworkManager 

Old mac you may check from any of the files you copied, new mac if unsure you can check with ip link (or from the file that likely got created when you installed your system for the connection you used to copy the files).

Note: above assumes you had a single Wi-Fi interface in both your old an new setup, but the same logic should work with multiple interfaces.

Source Link

As mentioned by others, wifi connection files in system-connections directory have the interface mac address included. This need to match your current setup hence the procedure is:

  1. copy all files from old machine to new machine from/to directory: /etc/NetworkManager/system-connections
  2. change MAC address entry in each file from old MAC to new MAC. As root:

cd /etc/NetworkManager/system-connections sed -i -e 's/<old mac>/<new mac>/ *

  1. Just in case, restart network manager:

systemctl restart NetworkManager

Old mac you may check from any of the files you copied, new mac if unsure you can check with ip link (or from the file that likely got created when you installed your system for the connection you used to copy the files).

Note: above assumes you had a single wifi interface in both your old an new setup, but the same logic should work with multiple interfaces.