Home
» LINUX
»
How to Transfer an Ubuntu User to a New Computer
How to Transfer an Ubuntu User to a New Computer
To transfer an Ubuntu user, archive the old Home folder on an external drive, create an account on the new PC, and extract the archive into a staging folder. Copy personal files and selected settings from there. This transfers Home contents, not the Linux account, password, installed programs, or system settings. Keep the old PC and archive until you verify the new setup.
Ubuntu keeps user files in /home/your-username; many application preferences are in hidden .config and .local folders. See its backup guide for details.
Before you start
Choose a drive with room for one archive; check its file-size limit if Home is large.
The archive contains private data. Keep it secure or use an encrypted drive.
Finish Ubuntu setup and create the account to keep. It can use a different username.
Transfer the Ubuntu user data
Step 1: Review the old Home folder
On the old PC, open Files and press Ctrl+H to reveal hidden items. Check Documents, Pictures, and custom folders. Hidden folders may contain app settings or credentials, so protect the archive. Close apps with open data, such as email clients, before copying.
Use Ctrl+H in Files to reveal hidden Home-folder settings before you make the archive.
Step 2: Connect and identify the external drive
Mount the drive and confirm it appears in Files. Replace USB_DRIVE with its folder name under /media/your-username. Leave it connected while archiving. Since Home is stored in one archive file, the drive itself need not preserve Linux permissions.
Save one archive file to the mounted external drive.
Step 3: Create the archive on the old computer
Run this in Terminal as your normal user. It compresses the current Home folder, including hidden files:
tar -czf "/media/$USER/USB_DRIVE/ubuntu-home-backup.tar.gz" -C "$HOME" .
Replace USB_DRIVE with the mounted folder name. Do not add sudo, which can make restored files belong to root. Large folders take longer. See the GNU tar manual for archive options.
The command uses the current user’s Home folder and writes a .tar.gz archive to the USB drive.
Step 4: Check the archive before disconnecting
Confirm the archive appears on the drive and has a plausible size. Read through its contents with:
tar -tzf "/media/$USER/USB_DRIVE/ubuntu-home-backup.tar.gz" >/dev/null && echo "Archive readable"
If it reports an error, recreate the archive. If it succeeds, eject the drive in Files before unplugging it.
Keep the original computer and archive until the restored files have been checked.
Step 5: Make a staging folder on the new computer
On the new PC, confirm the archive is present. Create an empty folder in Home and extract the archive there:
mkdir -p "$HOME/old-home-import"
tar -xzf "/media/$USER/USB_DRIVE/ubuntu-home-backup.tar.gz" -C "$HOME/old-home-import"
Use the same drive-path rule as before. The staging folder lets you inspect files without replacing the new account’s contents.
The staging folder keeps old files separate from the new account’s files.
Step 6: Inspect the extracted files
Open old-home-import in Files. Press Ctrl+H to inspect hidden items. Confirm expected files are present; skip unknown folders and do not run old scripts or installers.
Review the extracted files, including hidden folders, before restoring anything.
Step 7: Copy personal files into the new Home folder
Copy the folders you need—such as Documents, Downloads, Pictures, Music, Videos, Desktop, and custom folders—from staging to the matching locations in the new Home folder. In two Files windows, select items, press Ctrl+C, then Ctrl+V in the destination. If asked to replace a file, compare versions first to protect newer work.
Copy personal folders from the staging area into the new account’s Home folder.
Step 8: Reinstall apps and restore selected settings
Reinstall the apps you use, then copy only the needed per-app settings from old-home-import/.config or old-home-import/.local. Do not replace either whole folder; old preferences can conflict with newer apps or the new desktop. Use each app’s sync or export/import option when available. Treat .ssh and browser profiles as credentials. Installed programs and system settings in /etc are not included; set them up separately.
Reinstall applications first, then restore only settings that match the apps you use.
Open key files and apps, and confirm you can sign in. Keep the old PC and archive until these checks pass; then remove the staging folder and archive if no longer needed.