2

I am running Ubuntu 16.04 on a HP PC with a Core i5 Ivy Bridge processor. I am moving to another HP PC with a Core i7 Kaby Lake. So the hardware is different. I will be doing a fresh install of Ubuntu 18.04 on the new PC.

My question is what is the best way to move the home folder from the old PC to the new PC? I don't care much for the settings or .folder files. I just want to move all the data. Most of the software I use I plan to re-install the new versions. I figure doing that will be cleaner/fresher than cloning the hard-drive and doing an upgrade on the new PC (is this true?). I will just have to re-configure the settings. This is okay.

As for the data I have had issues in the past with user-access permissions and all that. I am not familiar with user/group id commands in Linux or how to deal with them. So what is the best way to move all data in the home folder to the new PC while avoiding access permission problems? My home folder is about 80 GB and I have access to a 1TB external hard-drive.

1
  • Move the Present data to that 1Tb via cp / scp / rsync or whatever method you feel most comfortable using, then install on the new PC. Once you have the 18.04 install completed, reverse the cp / scp /rsync / whatever where the source is the 1Tb drive and the target is the new PC's hard drive. Once on the new hard drive run: ` sudo chown -Rv $USERNAME:USERNAME ~/` and you should have MOST if not all permissions issues fixed out of the box. Jul 18, 2018 at 12:34

1 Answer 1

2

Let us say that user16 will be the user from your old Ubuntu 16.04, while user18 will be the user on your new Ubuntu 18.04.

  1. Create a tempfolder on your external drive, which will hold the your files.

  2. Copy the files from /home/user16/ over to the external hard-drive:
    sudo cp -R /home/user16/* /path/to/your/mounted/external/drive/tempfolder

  3. Then copy them to your new home folder on your Ubuntu 18.04:
    sudo cp -R /path/to/tempfolder/* /home/user18/

  4. To simply fix your permissions afterwards:
    sudo chown -R user18:user18 /home/user18/

If using graphical interface, then simply move the content of your home folder to the external disk and then back to your new Ubuntu 18.04, and simply change your permissions with the shown command. The command uses -R argument to change ownership of all files and folders inside the specified folder recursively, user18 before the : specifies the user, and user18 after the : specifies the group. Usually your default user has the same group name as your username. You do need root permissions to successfully fix your permission issues.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .