I deleted two answers of mine, because after some thinking I came to the conclusion those answers were not very good and/or not really my field of expertise:
Edit: I agree with [kba](https://unix.stackexchange.com/a/261944/151927) that using a partition manager to increase your home partition is not a good idea in your particular setup, because you would need to move your boot partition sda8 and that might cause problems. I have no idea how LVM works. That is why I cannot help you that much. One last thing: You might want to consider using sda5 which has 800gb as your home partition if that is possible. ---------- You can increase the size of the partition where your /home directory is with a partition manager like gparted. Since you already have linux installed, I would make a gparted Live USB key manually with the instructions on the following site: http://gparted.org/liveusb.php#linux-method-b I recommend this method, because the other methods to create a Live USB key sometimes don't work (gparted won't boot). Alternatively you can create a Ubuntu Live USB key with any version of unetbootin (Windows or linux version). It has gparted preinstalled. I hope I understood your question right. If you need more detailed instructions, I would gladly provide it.
I will answer my own question. No, at the beginning of a shell script `pwd` returns the directory from which the shell script containing `pwd` is executed. This can be any folder in the computer. In the script you can call `cd` to enter different directories which changes the `pwd` to the directory the script entered.
They are bad answers and/or there were better answers, so I deleted them to improve the quality of this site. Why did I get minus 20 reps for them, and now I am stuck not being able to answer questions where I do have expertise, because I cannot ask for more details with comments?