In terminal:
VAR="Extremely long and often used command"
echo $VAR
Output:
Extremely long and often used command
So far it works fine, but after restarting a terminal my variable doesn't exist. How to fix it?
|
In terminal:
Output:
So far it works fine, but after restarting a terminal my variable doesn't exist. How to fix it? |
||||
| show 3 more comments |
|
You can put it in your Or if it is an alias for a long command, you can put this in your
|
|||||||||||
|
.bashrc. If it's an environment variable put it in.profile, and you'll want to export it too. That should work. There's no way to know why it doesn't for you unless you provide more info (do you do anything weird with your rc files, etc.) – jw013 Nov 16 '12 at 16:04