0

My Ubuntu wont log in. If I type a correct password it just goes to a blank unity wallpaper and back to the log in screen. Funny It's being buggy when I decide to switch back to windows after a month of learning fun Linux commands.

How can I restore 1 text file from my documents folder in tty1? Since I can't log in, I only have guest and tty1. What should I do to recover things back? Can I reinstall unity through tty1 or something?

1

2 Answers 2

0

Sudo apt-get install, but i had something like you have now in the past. Did it happened while you where running a update and the screen locked by automatic screenlocker? That was what happened to me, and had the same problem, but i did run the update again in tty and problem was solved. Maybe it works also with you.

1
  • I cant get on desktop at all unless i use guest
    – nubb
    Apr 19, 2015 at 0:22
0

Reinstalling Unity would be

sudo apt-get install --reinstall ubuntu-desktop

but I don't know if this will help.

Of course you can access and copy your files from the TTY - you can do everything there if you don't mind a little typing...

You know the directory and file name of your document? Super!
Just run the following command to copy it wherever you want:

cp /PATH/TO/YOUR/DOCUMENT.FILE /PATH/TO/YOUR/TARGET.FILE

If you can't remember the path, use find. Let's assume you know the file name contains "personal" and is a .pdf file, then you can run

find ~ -iname "*personal*.pdf" 2> /dev/null

where the ~ (= your home directory) is the path to search in and * are wildcards which can stand for anything. The command could e.g. spot the file /home/YOURUSERNAME/Documents/PersonalDocument.PDF

If you want to copy the file to an external drive or another partition which does not get automounted at boot, you have to mount it manually. Therefore you need to know the device path which you can find out with lsblk. Search through the output for a partition (name sdXN, where X is a letter and N a number) that fits the size of your drive. If you are not sure, compare the outputs before and after plugging the drive in. I will assume your drive's partition is /dev/sdc1.

To mount the partition /dev/sdc1 of your device, you first need to create a folder as mount point. You may chose the name and location randomly, but I would recommend you to put it inside /mnt (which requires root permissions). After that, you mount the partition to this directory:

sudo md /mnt/MYDEVICE
sudo mount /dev/sdc1 /mnt/MYDEVICE

Now you can access the files and folders in your device as if they were located inside the directory /mnt/MYDEVICE.
After you are finished, unmount the device with umount (not unmount)

sudo umount /dev/sdc1

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