I want to create an alias of my home folder but I don't have write permissions on parent directory.

I used to have a username (user) on an old server. But now, I'm using a new server and my username has been changed to user2. Many of my scripts have absolute path to my old home folder name (/home/user). I want them to be compatible on my new server, in which my home folder now is different (/home/user2).

Obviously, I could've just created a symbolic link to my previous home name (ln -s /home/user2 /home/user). However, I don't have write permissions to the /home directory.

Is there any alternate option to create such alias without root permissions?


I'm using CentOS 5.

  • Ask your admin to create the symlink. – GingerPlusPlus Nov 12 '16 at 16:04

If your scripts are using paths based on the location of your home directory, use tilde ~ or an environment variable such as $HOME instead of hardcoding the absolute path.

  • 1
    @rikoji use awk or sed to replace your hard coded path. – Timothy Truckle Nov 12 '16 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.