Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to run some programs which depend on a home directory, but my current user does not have a home directory defined. I don't want to create a user just to run this program, and I don't want to run it as root. Is there a way to define a home directory (eg /tmp) for just the current session? So that, for example, ~ is defined in bash.

share|improve this question
    
~ is shorthand for $HOME as far as I know. –  Bobby Aug 30 '13 at 10:25

1 Answer 1

up vote 3 down vote accepted

You should be able to accomplish what you want by issuing export HOME=/tmp in your user session.

There's plenty of explanation on the tilde expansion in the bash man page.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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