Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried doing that with export and set env, but it did not work. how to do it?

for example

~/directory$ export a.home=1 
bash: export: `a.home=1': not a valid identifier
share|improve this question
up vote 8 down vote accepted

The dot is not a valid character in a shell identifier.
So the answer is "you cannot do what you ask":

   name   A word consisting only of  alphanumeric  characters  and  under-
          scores,  and beginning with an alphabetic character or an under-
          score.  Also referred to as an identifier.
share|improve this answer
You can set var names with periods as per @Amos 's post below – Taras Mar 25 '14 at 6:26

Actually a colleague just asked me and I found a work-around - use

env var.with.dots=value command
share|improve this answer

Your Answer


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.