How well this will work depends on how your current partitions are laid out, among other things. Definitely make a backup of all data you care about before you do this. I always make sure I have a complete backup of my entire system before I upgrade from one Fedora to another. So far, I've never needed the backup, but ... better safe than sorry.
If you currently have a separate /home partition, then all of that data will very likely be preserved if you install Fedora over an existing Ubuntu installation. But you will have to take care when you go through the partitioning steps to be sure that the /home partition is not reformatted.
If you currently do not have a separate partition for /home, which you can figure out with the df
command, then I wouldn't count on the data being preserved across the install, although I suppose it is possible. I've never tried such an installation.
Whatever you do, make a complete backup of all data you care about first. You can use the rsync
command to back your data up on an external disk, for example. Or just cd ~; cp -a . /path/to/external/drive
. Then be sure that this external drive is not connected to your computer when you install Fedora. My backup media is always powered off during upgrades to avoid even the possibility of formatting the wrong drive.
With a full backup of you important data on an external drive, you can confidently (and carefully) do the installation, and if the /home partition is wiped by accident, just copy the data back from the external drive. You do back your data up periodically, right? Hard drives do fail, so if you care about this data, you want to have something to back it up to even when not doing installations of new Linux versions.
Note: As Gareth Jones says, post-install you need to be sure that file ownership (uid/gid) and SELinux attributes are appropriate. For the sake of argument, assuming you use the username zedd2006, post install as the root user you want to do this:
cd ~zedd2006
chown -R zedd2006:zedd2006 *
restorecon -Rv .
Those commands will set the correct new uid (user ID) and gid (group ID) and then apply the correct default SELinux context to all of your files.