Well, you could just add this line to your ~/.profile
1:
HOME=/user/home/
However, that really isn't a good idea. Problems it would cause include (but are probably not limited to):
That will only work if /home/user
is owned by your user. If it isn't, you won't even be able to log in.
This will work for your user only. For everyone else, your home directory will be whatever is stored in /etc/passwd
. This means that, for example, cd ~user
will fail. In other words, if I log in as bob
and bob
has the line HOME=/home/bob/foo
in ~/.profile
, then bob
thinks that his home directory is /home/bob/foo
but nobody else knows that:
$ whoami
bob
$ echo $HOME
/home/bob/foo
$ cd ## this moves to your $HOME
$ pwd
/home/bob/foo
So far so good. But:
$ whoami
terdon
$ cd ~bob
$ pwd
/home/bob
- This will drive your sysadmin insane. You do not want to anger your sysadmin for you are crunchy and taste good with ketchup.
In any case, it is rarely a good idea to mess with variables like $HOME
, as it can often have unintended consequences. Instead, a much cleaner solution would be to make sure every new shell session starts in the target directory. Just add this line to your ~/.bashrc
:
cd /user/home/
Now, each time you log2 in or open a terminal, you will find yourself in /user/home
.
1 Or ~/.bash_profile
if it exists.
2 Log in to Debian-based systems like Ubuntu, anyway. For other distributions/OSs, you might need to add it to ~/.profile
as well.See here.
It is really simpler than you think. All you have to do is that when installing the Ubuntu, you will see a page in the installation wizard called user settings. There you will fill up your system password and usernames. So down there you can see a check box says Encrypt my Home folder also
All you have to do is that to check mark it and proceed as usual. It is easy to do.
Best Answer
I used so far the following command:
tar -cvf - /home/your_username/ | split -b 2000m -d -a 3 - /media/backup.tar
As you said you have 12 GB to copy you should have 12 GB of free space on this usb-stick/drive.
To copy the files back to its orig place you just move them back to your home/username folder. Therefore you type in a console that you open in your /home/your_username folder:
cat /media/backup.tar.* | tar -xvf -
terms:
You could also copy to your win partiton. But I am not really a friend of that cuz even your win might get damaged somehow. But if you still prefer that you will have to mount your win partition first (if not done already) and then write the files there. (just adjust the commands accordingly)
But I have to admit I never mounted my NTFS partition in Ubuntu. But it should be somehow like the following:
after you copied:
But I am not a Linux -> NTFS expert. Might be you need NTFS-3G. So best thing will be putting your backup on a normal VFAT32 drive.
I hope I did nothing forget. But as others might read it here they are welcome to comment on it.
BUT I have never tried that out of recovery mode. So wait until you have your CD at hand. But if it works in recovery just report back here please cuz others might need that info once as well.
Good luck!