Professional Documents
Culture Documents
If you have accepted the default option while installing Ubuntu, or that your computer comes with
Ubuntu pre-installed, chances are that your Home folder and the system folders all lie in the same
partition. This is perfectly ne, but if you want to upgrade your existing Ubuntu version, or reinstall
Ubuntu, you wont be able to preserve your app settings, or even retain your les and documents. One of
the good practice is to give the Home folder its own partition, so whatever changes you made to the
System folder wont affect your Home directory, and you can easily upgrade or reinstall Ubuntu with
ease.
If you want to move your Home folder to another partition, here is how you can do so.
Assuming that your computer has only one hard disk and it contains only one partition. To create a new
partition, you have to rst obtain a Ubuntu Live CD/USB and boot into it. You cant partition the hard disk
when it is running.
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 1/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
Once you are booted into the Live session, open the app GParted. Select the hard disk from the list. It
should be labelled something like sda.
You should see a number of entries in the list. Select the entry that corresponds to the main partition. It
should be the one with the biggest le size and is either in the ext3 or ext4 lesystem format. Right click
on it and select Resize/Move.
Set the size for the new partition in the Free Space Following eld. The number is represented in MB,
so if you want to set aside 10GB for the new partition, enter 10000. You will notice that as you enter
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 2/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
the number, the number in the New Size eld will decrease accordingly. My usual practice is to set
aside 10GB for the system les and allocate the rest to the Home partition. Click Resize/Move.
Back to the GParted main screen, you should now see a new Unallocated entry with the le size that
you have set earlier. Right click on it and select New. Select ext4 as the lesystem and click Add.
Lastly. click the green check button to apply the changes. Depending on your hard disk size, the resizing
process might take a long time
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 3/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
After the process is completed, you should see something like the screen below. Record down the new
partition number.
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 4/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
Now shut down the live session, remove the live CD/USB and boot up the computer.
2. Copy the les from your current Home folder to this temporary Home folder.
sudo blkid
This will display the UID of all the partitions. Record down the UUID for the partition that you have
created earlier.
and add the following line to the end of the le. LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 5/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
Replace the UUID with the UUID value of the external partition.
sudo mount -a
2. Copy the les from your current Home folder to the new Home
folder
The next thing we are going to do is to copy all the les from the current Home folder to the new Home
folder. You can simply do a Select all, Copy and Paste to transfer all the les to the new Home
folder. However, you might be missing out the hidden les and some of the le permissions might not be
preserved. A more complete method would be usingL Orsync
A D I N G .. . .
https://www.maketecheasier.com/move-home-folder-ubuntu/ 6/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
cd /
sudo mv /home /home_backup
sudo mkdir /home
What the above commands do is to move the existing Home folder to Home_backup, and create an
empty Home folder for the new Home folder to mount to.
All you have to do is to change the /media/home to /home. Save and exit the le.
sudo mount -a
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 7/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
Thats it. You have now migrated your Home folder to an external partition.
Once you are done with the migration, you can either use the old Home folder as a backup, or remove it
to release the storage space. To remove it, use the command:
Related Ebooks
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 8/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 9/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
Joven De Mexico Desarrolla App Que Lo Hizo Ganar Millones. Descrgala Aqu
38 comments
Neil Greenwood
Since Ubuntu 8.04, reinstalling without formatting the existing partitions will save the previous home folder
even if its all on a single partition.
Damien
Yes, but that is only when you have set it up properly. In addition, not all ubuntu-based distro
retain the same installation process as Ubuntu. I installed one and it wipe out my har d disk
entirely.
John Billot
Damian, thanks a million for this, you obviously work for GCHQ in the UK and have been monitoring my
emails!
I have been researching buying a small SSD (say 64Gb) to put my Ubuntu/Linux OS on with the HDD
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 10/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
being used for the Home folder. This would do the trick perfectly.
Thanks again.
Damien
Shh dont reveal my *undercover* position :p Hopefully you are not implying I am working for
NSA
dragonmouth
I have been researching buying a small SSD (say 64Gb) to put my Ubuntu/Linux OS on with
the HDD being used for the Home folder .
The following article might help you:
http://www.makeuseof.com/tag/using-a-small-ssd-and-a-r egular-hard-drive-how-to-organize-
your- les/
John Billot
Thanks for that, have bought a 64GB SSD and plucking up the cour
age to install
Ubuntu 13:10 plus various apps on it.
dragonmouth
Make sure that any partitions that are written to frequently, are
allocated to the HDD. It will extend the life of your SSD.
Tim12in
thanks for taking the time o
t put all the details. Really helps
Mark
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 11/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
I have found the rsync command you gave has not been transferring all my les (e.g. the .thunderbird
directory, which is obviously important I dont lose).
Thanks.
dragonmouth
I use the following procedure to set up my /home partition:
Since whenever we are to change anythingon the HD we should back it up,
1) I rst back up my /home partition to another drive (usually an external).
2) Then I re-partition the drive, setting up separate /, /home and swap partitions.
3) Do a fresh install of the O/S.
4) Con gure the O/S, setting up all the users.
5) Restore the backed up /home partition to its new location.
6) Reboot.
This procedure avoids the use of Terminal and editing of system les.Any error in editing or in issuing a
command can result in an unbootable system.
BTW I use a Live GParted CD rather than a Live Ubuntu CD. GParted Live loads much faster and goes
right into the partitioning screen.
Damien
That will work, but you will have to reformat your hard disk.
dragonmouth
It does work. What do you mean reformat hard disk? That gets done as part of
the re-partitioning process.
For my next trick I will put the / partition on an SSD and /home and /var on an
HDD. :)
Ogui
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 12/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
kindly let me know how to undo this it did not work. I get major error on startup and now only starts
without my data partition mounted (and does not let me mount it!) thanks.
dragonmouth
I get major error on startup
What does the error message say?
MaxK
Brilliantly clear and easy to follow steps not all of which I understand which is irr
elevant. What puzzles
me: HOME is still in the le directory list on the boot partition. On opening HOME(boot) it opens in thethe
new partition. What concerns me: A new OS install will wipe the Boot par tition but wont deletion of the le
link cause the data in the other partition to be deleted as well?? Thank you very much. MaxK
Damien
The data wont be deleted. It is just a mounting point. All oyu need to do is to update the fstab
le and it will remount the external partition as Home again.
When you are install a new Linux distro, you can set the external partition as /home and set it
to Do not format. In this case, you can preserve your data in the home folder.
xolani
I used the following to ensure ALL my les where copied over and I could see the progress:
sudo rsync -avrXS /home/. /media/home/.
vimbai-naye chatitai
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 13/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
This was super-easy to follow. My OS is on a 20gig SSD and space was running out, quick. o
Yu
saved my bacon with this post Siyabonga :-)
Leo Newburn
I have 2 older SATA drives, each 300 GB and each with their own distr os UBU STudio 12.04.4 LTS 64 bit,
and UBU 13.10 64 bit.
I just installed a new WD SATA drive, 1 TB, partitioned it at 200GB for Windows 7 (now installed rst) as
NTFS. The remaining I partitioned ext4.
How can I migrate my 2 Ubuntu OSs into the new 1TB drive? I intend to follow your suggestions here to:
1) Move the /home folders of each Ubu OS into its own separate /home folder on its each own partition in
the new drive;
2) Delete the old /home folders;
3) Migrate the old Ubuntu OSs to their own separate partitions on the new drive;
4) Reformat each old SATA drives as ext4;
5) My goal as an end result would be:
a) Keep the WIN 7 partition as is with its own world;
b) Set up each Ubu Distro with its own separate /home folder on SATA #1 (old drive) /home folder, so that
any data happening through my everyday use of those distros would automatically save that data in its
new /home location.
After all this I will setup SATA #2 as a backup medium, which is another matter thatIm not asking about
here.
Cheers, and any kind of direction/help you can offer I would be grateful.
~Leo Newburn
leokn@yahoo.com
Damien
Your scenario is pretty complicated. It is easy to move les and folders, but not thewhole OS. I
would advise you to partition the ext4 into several smaller partitions, then reinstall the 2
Ubuntu OS to each partition. Once you have installed and booted up Ubuntu, you can then
transfer les over from the old SATA drive.
Jim Smith
Thanks for the timely information.Just one question.What about data that might be somewher e besides
the /home directory? and how do you know if there is any elsewhere? Im thinking of db les or scripts
youve installed.
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 14/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
Best Regards,
Jim
Damien
It depends on the con guration of each individual application. Most
applications do store their data in the Home folder. One thing though, as
long as your le structure is intact, it doesnt really matter where they
are stored. You can still access them even though you have changed to a new
Home partition
Hank
Hey Damien,
I believe this has to do with the rights to the home folder? Do you have any idea to what I should change
this, given that this is indeed the issue?
Hank
Nvm, I had to change the owner to user (chown user:user dir/). Solved!
Kris
This is a very well writen post, thanks. I e
r commend using:
The [v] for verbose will show users that rsync is still runing if the
y get an error. Panic might unsue if they
think the process has stopped or hung-up causing them ot do something silly. Like kill the machine.
Dont forget to backup everything before starting this. That cant be stressed enough.
My System:
Mint Linux 14
LOADING...
1- 2 TB Drive 2 Partitions /home /shared media
https://www.maketecheasier.com/move-home-folder-ubuntu/ 15/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
1- 500 GB Drive /
2- 650 GB Drive in Hardware RAID 1 /backup (location of all backup les)
If I want to upgrade the kernel or any failure in the OS I unplug the 2 TB drive and do all the repair or
upgrades. Once everything is working properly then reconnect the 2 TB and mount back at /home. W orks
great! I have a persistant copy of home data going back 12 yrs.
Venki
Clean and simpleinstructions, I just followed it and it work
ed great.
hr
thats very good instruction
Anna
Looks promising.
I have on question: will your old settings/desktop etc. not break your updated machine? For example: I am
on Ubuntu 12.04 and want o t update to 14.04, will the settings/desktop settings not break my updated
14.04? How will this works when you want another distro, because all settings, les and desktop will be
maintained?
https://help.ubuntu.com/community/Partitioning/Home/Moving
settings, les, and desktop will be maintained if you upgrade, (re)install Ubuntu or another distro.
Damien
It shouldnt break the settings. Only the system les will get updated. The Home folder and
settings will still be intact.
Duarte
Worked perfectly, thanks!
https://www.maketecheasier.com/move-home-folder-ubuntu/ 16/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
Frans
Worked like a charm for me on SolydX!
(Added second WD harddisk 320Gb)
Roberto
Great technique to havea shared storage drive between Windwes and Ubuntu. However, it did not work
perfectly for me. The home folders on theleft sidebar of Unity are there, but when I click on them I get an
error: Documents could not be found. Perhaps it has recently been deleted.
However, my storage drive is now under the home folders, and that s how I can access my les. How do I
make those folders on the left bar er present the folders in the shared drive?
Damien
Did you check that the Documents and all other system folders ar e in the
new Home partition? If it still doesnt work, one of the alternative is to
create bookmarks for the folder you want to access.
Roberto
After rebooting Ubuntu, I see that the Documents, Picutres, etc. folders from the
storage partition are now accessible in /home. But the shortcut folders in Unity
have gone back to the default Ubuntu home folders, not the shar ed partition folder.
They are in /home/my-name. It would be nice if they were the same folders as the
ones in /home. When I right-click on then, the option of Remo ve is ghosted out.
roadrawts
Thank you. Very clear instructions with good examples. Worked perfectly.
GusCor
How I migrated the data from a HDD with bad blocks
L O A D I No
tGa. . new
. HDD.
https://www.maketecheasier.com/move-home-folder-ubuntu/ 17/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
I have Linux Mint running in a SDD and the /home folder in a HDD
. The HDD developed bad blocks and was
under warranty. WD sent me a new HDD o t replace my old new 2TB HDD. After much reading and
researching online this is what I did:
First plug the new HDD into a SATA slot in motherboard, then
Ana
Well thank you very much, it worked like a charm. =)
blaz
Thank you for your tutorial. It saved my a lot of problems and discovery. We just bought 4 disc drive in
RAID10 that we will use for sharing les and this does the trick.
Best regards,
Blaz
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 18/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 19/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
About Contact Advertise Write For Us Terms of Use Privacy Policy RSS Feed Terms
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 20/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
close
LOADING...
https://www.maketecheasier.com/move-home-folder-ubuntu/ 21/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
https://www.maketecheasier.com/move-home-folder-ubuntu/ 22/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
https://www.maketecheasier.com/move-home-folder-ubuntu/ 23/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
https://www.maketecheasier.com/move-home-folder-ubuntu/ 24/25
3/21/2017 How to Move Your Home Folder to Another Partition in Ubuntu
https://www.maketecheasier.com/move-home-folder-ubuntu/ 25/25