0

I was installing a software app on Ubuntu 22.04. After installation was complete, my system shows this:

screenshot

I can't find my home, document, desktop folders. I think while installing the software, I choose the path to /home and it overwrote everything. What should I do now? Any solutions please

I was installing mathematica software via the terminal. It showed that the default path /usr/local/wolfram/mathematica does not have enough space available, so I provided a new path /home for the installation. It asked to overwrite the content and I think I typed yes. After software install completion I could not find anything on my desktop and my home folder also went missing.

terdon
  • 104,119

2 Answers2

1

Something happened to your home folder. We know even less than you what might have happened to it. So take a look.

If another account with root permissions is available on the system, log in on that one. Else, you can boot into a recovery prompt from the Grub menu. Yet another option is to start a live session. In brief, make sure that in one or another way, you can look at and work with your system disk.

Check the "/home" directory on the system partition (which, if that one is mounted e.g. on "/mnt" in a live session, would be /mnt/home). Presumably, judging from your screenshot, your home directory will not be there, at least not under the expected name "ishfaq".

  • Check whether it may be there under another name. If that is the case, changing the name back to the original name may already suffice to make your system bootable again, provided no other harm was done to its contents.

  • If that does not work, create a fresh account:

    • create a new home folder, make sure it has permissions 775, and make your user the owner and group.
    • Copy the hidden files (including .profile amd .bashrc) over from /etc/skel to that new home folder.

Now shut down and reboot: you will now be able to login to your account. However, you will be greeted with a shiny new factory default desktop.

At least, your system is working again at that point. You can then continue to see whether you still can recover files from the original home directory. If you do not find any of the old home data, you will need to reconfigure your desktop and copy your data back from your backup.

vanadium
  • 97,564
1

You have deleted your home directory, as well as the directories of any other user of your system. You will need to restore from backup. /home is not your home directory, it is the directory in which all users' home directories are stored. So when you said "yes" to overwriting /home, you deleted everything in there, including your home directory.

If you have a backup, you can restore from it. If you don't, you're basically out of luck, but can try some of the options explained here: How to recover deleted files?

terdon
  • 104,119