I have a current /home/user/ directory for ~ but I want to change it to be at /user/home/
/user/home already exists.
The option of using usermod
is not going to work because I don't have access to the system as root or as another user.
I am asking for a solution along the lines of modifying some .bashrc file and changing some environment variable or smth similar. I log in via ssh.
I'm running Ubuntu 14.04.
Thank you in advance
Solutions like the ones below unfortunately aren't applicable to my case:
How to change my own home directory?
How to change my default home directory
https://stackoverflow.com/questions/20797819/command-to-change-the-default-home-directory-of-a-user
EDIT
I thought I'd give some more info here rather than respond to the comments.
Currently the folder structure is a lot stranger than my example above, but the jist of it is the same. Ie currently when I do:
user@local:~$ ssh user@host
I end up in:
user@host:~$
user@host:~$ pwd
/path/of/current/home/
so when I use things like pip
with the --user
tag it will install things locally.
Because there are some memory limitations as well as ssh
issues with writing to that location (after some time I can no longer write) I would like to have the following behaviour:
user@local:~$ ssh user@host
user@host:~$
user@host:~$ pwd
/path/of/new/home/
/path/of/new/home/
already exists and doesn't have the limitations set above.
/home/[userID]/...
folders. If the problem is disk space, you should consider moving/home/
or some sub-folders to a new partition. Hint, partitions can be mounted as any (sub-)folder. See Move home folder to new partition.login
,.bashrc
,.profile
and only in.profile
it works. The line I added isexport HOME=/path/of/new/home/
but I'm not sure if that is all I need to do, or if something else gets affected