How to change environment variable path $HOME to another?

Asked

Viewed 212 times

0

The intention is to load with you all "created or downloaded" files, and reassemble it in any Livecd distro, leaving it as the default directory.

Note that, the essential in this logic of reasoning is only save files created and coming from the internet, without any concern in saving the settings (hidden files).

I did so:

$ unset $HOME

$ HOME=/mnt/sda1

$ export HOME

$ echo $HOME

$ /mnt/sda1

However, I cannot record or execute anything there, I get the following message - Read-only file system I have tried to effect the change of permission with the command - chmod 777 /mnt/sda1 but it was impossible.

I have with me that there is something correlated to the name of user.

I’m trying to find the solution.

  • Note that the problem may be at the time the unit was assembled, you who assembled it? to change the $HOME, just type in the terminal: export HOME=path/new

  • Take a look here, it can help you: http://askubuntu.com/questions/175739/how-do-i-remount-a-filesystem-as-read-write

  • I think it would be more feasible to change the user folder path by using the usermod.

  • @Brumazzidb All right, but as much as I could do with this tool(usermod) was "disable" much of my OS.

  • @Diegohenrique, have you looked at the documentation of the command? o usermod serves to change the user account (root directory, validity, groups, etc). I don’t see how the command "initialize the OS"

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.