Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am new to Ubuntu. I am trying to create a link to a script so that when I type ideaiu in the terminal, it opens /home/bob/programming/libs/intellij/bin/ and runs idea.sh script from there.

I tried to put export ideaiu="/home/bob/programming/libs/intellij/bin/idea.sh" to .bashrc, but it has not helped.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Add it as an alias

alias ideaiu="/home/bob/programming/libs/intellij/bin/idea.sh"

export is for environmental variables and is used when you want the variable to be available to all shells.

See http://stackoverflow.com/questions/1158091/bash-defining-a-variable-with-or-without-export

share|improve this answer
    
Would this command have to be run whenever the computer is restarted, or the shell is closed? Is there a way to make the alias persistent? –  dan08 Jun 27 '13 at 19:51
1  
Put the alias in ~/.bashrc . If you want the command to be on your path use PATH=$PATH:/home/bob/programming/libs/intellij/bin/idea.sh. If it is in your path, you will not need an alias. If you want the command to be available to all users put it in /usr/local/bin –  bodhi.zazen Jun 27 '13 at 19:58
1  
@bodhi.zazen, you mean PATH=$PATH:/home/bob/programming/libs/intellij/bin; only directories make sense in PATH. –  geirha Jun 27 '13 at 20:11
    
yes, can't edit that –  bodhi.zazen Jun 27 '13 at 20:13

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.