I'm a bit of a newbie when it comes to using Linux.I've recently installed Ubuntu 12.04 LTS (minimal virtual machine) on a VPS host. I've encrypted the virtual disk and encrypted the home directory of my main user account, that I'm using to access the install through SSH (using public key authentication). So far, so good. The thing is: I can't figure out what exact action it is that is making my hidden files appear and active (such that I am able to use aliases, such as ll).When I sign in initially with SSH and issue ls -al, all I see is:dr-x------ 2 username username 4096 Feb 10 01:10 .drwxr-xr-x 4 root     root     4096 Feb 10 01:10 ..lrwxrwxrwx 1 username username   56 Feb 10 01:10 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktoplrwxrwxrwx 1 username username   34 Feb 10 01:10 .ecryptfs -> /home/.ecryptfs/username/.ecryptfslrwxrwxrwx 1 username username   33 Feb 10 01:10 .Private -> /home/.ecryptfs/username/.Privatelrwxrwxrwx 1 username username   52 Feb 10 01:10 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt(As an en passant: why are permissions set to lrwxrwxrwx for most items here? Isn't that far too tolerant?)Then, when I issue ecryptfs-mount-private (as per the README.txt) and issue another ls -al, I keep seeing the same as above.One time, I believed I was able to use aliases after I issued a sudo command, but another time I was not able to. Then, another time I issued cd /home/username (which is the same directory as ~ already, is it not?), and all of a sudden all other hidden files appeared and I was able to use aliases.But now, after a few minutes in (but perhaps I've actually imagined this), even though I'm still able to see all the hidden files, I'm not able to use aliases anymore. This makes me believe this behavior is somehow coupled with sudo, but I can't seem to figure out what exactly is going on here.Can somebody enlighten me and explain what exact actions I need to undertake to see all hidden files in my home directory and enable aliases, and why this is (is it because of the encryption; is it coupled with sudo; or perhaps something completely different)?If possible, preferably, I'd like this to automatically be enabled when I login with SSH. Is that possible?edit (clarification for Hauke Laging's comment):When I log in with SSH and immediately issue ll in ~, I get -bash: ll: command not found. (Although now, it appears to work immediately after I logged out and logged in again, but perhaps this is because the other time it was the first time after boot up? I have no idea, really. It all appears to behave rather random.)Then, one time, I believe I issued a sudo ls -al, or some other inane command, after which ll appeared to work.Another time ll didn't work, and only after I issued ecryptfs-mount-private and did an explicit cd /home/username, the hidden .bashrc (etc.) files appeared with ls -al, after which I was finally able to use an alias such as ll. But, you know what? I think I'll have to investigate this a bit more thoroughly, since my vague descriptions are probably getting us nowhere. I was hoping my problem would immediately ring a bell, but it appears I have to be a bit more precise about what actions I undertook.What I am trying to accomplish though, is this:When I log in through SSH (whether it be the first time after boot up, or any other time after that), I want all hidden files, in my home directory, to appear immediately when I issue ls -al and that aliases, such as ll, are immediately available as well.My analysis of the problem, thus far, is that it appears that I first have to decrypt my home dir, before I am able to see the mentioned hidden files (apart from the ecryptfs-related symbolic links) and use aliases. Is that a correct assessment?
What makes the files in my home directory appear, when I log in through SSH then run ecryptfs-mount-private?
mount;directory;login;home;ecryptfs
Situation: you have an encrypted home directory.Step 1: you log in over SSH. Your encrypted data is not mounted, so what you see is your real home directory on the (unencrypted) main filesystem. This home directory doesn't contain much that's directly usable:~/.ecryptfs/ contains control data for your encrypted data~/.Private/ contains your encrypted data in encrypted form~/Access-Your-Private-Data.desktop is a desktop icon to mount your private data~/README.txt contains human-readable instructions to mount your data.Your .bashrc and other dot files that you're used to aren't available because they're on the encrypted volume that isn't mounted.Step 2: you run ecryptfs-mount-private. This mounts your encrypted data to ~ (your home directory). After that point, ls -lA ~ will show your dot files such as ~/.bashrc. If you run a new instance of bash, it will therefore read your .bashrc and you'll have your aliases available.A subtlety is that after step 2, the current directory of your interactive bash shell is still the home directory on the non-encrypted volume. Mounting the encrypted volume on ~ changed the directory that ~ refers to, but does not change the directory that bash has open. If you run cd ~ in bash (or the shortcut cd), it will change its current directory to what is now called ~, even though this won't affect the value reported by pwd.If you log in over SSH while your encrypted home directory is already mounted, then as soon as your login shell starts, it sees the files in your encrypted volume, so your aliases are loaded. Mounting an encrypted volume (or any other filesystem) is a global action, it is not confined to a login session. If you run ecryptfs-umount-private, that makes your encrypted data unavailable, back to the boot-time state.  Technically, this is the current directory of the bash process, not an open file, but the behavior is the same.  