I copied personal files to ubuntu live home directory usb. with intention of transferring to another pc. but files seem to be lost. how can i recover these files

  • 1
    Were the files lost 'directly', or after reboot (or shutdown and boot)? A live (live-only) system will not preserve files (any modifications) after reboot/shutdown, but you can create a persistent live system with mkusb – sudodus Aug 16 '18 at 6:35
  • 3
    the filesystem on a 'live' system is created in memory/ram and isn't on the USB thumb drive (the usb-thumb drive contains compressed images that are expanded to the created file system in memory). They exist until you reset, reboot or turn-off your machine. This applies to all files, not just those in /home – guiverc Aug 16 '18 at 6:44
  • @guiverc Won’t you rather post an answer? – Melebius Aug 16 '18 at 8:04

I am sorry but you are not able to recover your data.

A Ubuntu live stick/disk is not persistent and everything is deleted after a restart. There are ways for creating a persistent USB-Stick, but an external HDD or another USB stick would be the easiest way for transfering data to another computer.

| improve this answer | |

A 'live' system (such as Ubuntu install media when you select 'try ubuntu') creates a file system in memory (RAM). The compressed OS (Ubuntu operating system) is expanded and stored in this RAM file system, as well as /HOME or user directory for the 'live' user (which is where the GUI stores its needed temporary [work] files).

Any files changed (eg. /etc/hosts or any other system config file), let alone in user files stored in /home/user/ get lost on reboot, shutdown or reset.

For information on how the system is expanded, see https://wiki.ubuntu.com/BootToRAM

For information on system persistence (ie. having a live system that can save files), but please note this is not the default so you must create it, see https://wiki.ubuntu.com/LiveUsbPendrivePersistent

After reboot, shutdown - the files stored in [the] RAM [file-system] are lost.

Live systems are really designed for testing your system (why it is selected with "try ubuntu") as the file system created in memory has limited space meaning you can't expect it to upgrade to the latest packages (unless relatively new and thus limited changed packages), or add much additional software, let alone store & keep your user files without getting full-disk messages as you've filled the '/' file-system in memory; the file system is not dynamic in size (once created, it doesn't grow). As it was created for testing your hardware, it fulfills its purpose and you can enable persistence if needed.

I would suggest using scp (secure-copy) to copy your user files before you turn-off or reboot next time, or mount a network drive & save files whilst using the 'live' system. Alas it's too late for any files you created then.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.