How to Carry Saved WiFi Credentials from Ubuntu 24.04 to a Fresh Kubuntu 26.04 Install

Abstract: Yes — saved Wi-Fi profiles survive a clean reinstall. Restore the netplan YAML and NetworkManager keyfiles to their original paths, fix permissions, and run netplan apply.

Created: 2026-11-02 by

Yes — your saved Wi-Fi profiles will survive a clean reinstall. Copy the netplan definitions from /etc/netplan (plus any NetworkManager keyfiles from /etc/NetworkManager/system-connections) onto the new system at the same paths, make sure ownership and permissions are correct, then run sudo netplan apply so the imported definitions become known to NetworkManager.

Where your saved networks actually live

Ubuntu keeps network configuration in two layers, and knowing which holds what makes the migration obvious:

  • /etc/netplan/*.yaml — the declarative source files. A wifis: block with renderer: NetworkManager is turned into live connection profiles each time netplan applies.
  • /etc/NetworkManager/system-connections/*.nmconnection — keyfiles written by NetworkManager itself, typically for networks you joined through the desktop applet. SSIDs, passwords and every per-connection setting live here.
  • /run/NetworkManager/system-connections/ — runtime profiles generated by netplan. This directory is rebuilt on every apply, so treat it as read-only.

An install with "quite a few" saved networks may have entries in both persistent locations, so plan to back up both directories.

Back up the old system, then restore onto Kubuntu

On the 24.04 side

Do this from the old install (or a live USB with its disk mounted) before reformatting anything. The -a flag preserves ownership and permissions, which matter later:

sudo mkdir -p /mnt/usb/netplan /mnt/usb/nm
sudo cp -a /etc/netplan/. /mnt/usb/netplan/
sudo cp -a /etc/NetworkManager/system-connections/. /mnt/usb/nm/

For a single-file record you can also run sudo netplan get and save the merged output. Keep the backup private — these files contain pre-shared keys in plain text.

On the fresh 26.04 side

Once Kubuntu is installed and booting, copy the files back, normalise permissions, and apply:

sudo cp -a /mnt/usb/netplan/. /etc/netplan/
sudo cp -a /mnt/usb/nm/. /etc/NetworkManager/system-connections/
sudo chown -R root:root /etc/netplan /etc/NetworkManager/system-connections
sudo chmod 600 /etc/netplan/*.yaml /etc/NetworkManager/system-connections/*
sudo netplan apply

A fresh desktop install ships with its own small YAML file in /etc/netplan that simply sets renderer: NetworkManager. Leave it in place unless it conflicts with something you imported; your old files can sit alongside it. Then verify:

nmcli connection show

Every migrated SSID should appear in the list, and profiles marked autoconnect will join known networks without prompting.

When migrated profiles don't show up

  • Permissions. Netplan complains about world-readable YAML files, and NetworkManager quietly ignores keyfiles that aren't root-owned with mode 600. The chown/chmod step above prevents both.
  • Renderer mismatch. YAML without renderer: NetworkManager is handed to systemd-networkd instead, and those Wi-Fi networks never reach the desktop. Check each imported file.
  • Hardware binding. Profiles can be pinned to a MAC address or interface name. That's harmless on the same machine, but if you later move them to different hardware, delete the binding so the profile attaches to the new adapter.
  • Duplicates. The same SSID defined both as YAML and as a keyfile produces two competing profiles. Keep one and delete the other.
  • Apply errors. sudo netplan --debug apply names the exact file and line that failed.

YAML or keyfiles: pick one route per network

Both restore paths work, but they trade off differently. Restoring the .yaml files and running netplan apply keeps everything in netplan's declarative format — tidy, centralised and easy to review — but its NetworkManager backend covers only common settings, so less usual options (some 802.1X parameters, for instance) may not round-trip. Restoring the .nmconnection keyfiles instead preserves every setting NetworkManager ever stored and needs no netplan involvement at all: sudo nmcli connection reload is enough. The drawback is that keyfile profiles are invisible to netplan, and describing the same network in both formats creates the duplicate-profile problem above. For ordinary home and office WPA networks either route is fine; for enterprise setups with certificates, prefer the keyfiles and make sure any certificate paths they reference still exist on the new system.

Make future reinstalls painless

Once the new install behaves, archive both directories to external storage so the next reinstall is a five-minute job:

sudo tar -czf wifi-backup.tar.gz -C / etc/netplan etc/NetworkManager/system-connections

The archive contains live passwords, so store it encrypted rather than on a bare USB stick.

Frequently Asked Questions

Are the saved passwords stored in plain text?

Yes. Pre-shared keys sit in clear text in both formats; root ownership and mode 600 are the only protection. Treat every copy of these directories as a secret.

I copied the YAML files over but nothing changed — why?

Netplan generates the NetworkManager profiles only when applied. Run sudo netplan apply, confirm each file sets renderer: NetworkManager, and check for parse or permission errors with sudo netplan --debug apply.

Can I skip netplan entirely and use only the old keyfiles?

Yes. Copy the .nmconnection files into /etc/NetworkManager/system-connections with root-only permissions and run sudo nmcli connection reload. This classic method works independently of netplan.

Why does one network appear twice after migration?

Because it exists in both a YAML file and a keyfile. Delete whichever definition you don't intend to maintain, then re-run netplan apply or nmcli connection reload.

Does this transfer VPN and wired profiles too?

Yes — VPN, DSL and Ethernet connections live in the same directories and migrate with the same copy-and-apply procedure.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More