0

Sorry I am new to ubuntu, just installed it. The version Ubuntu 14.04.4 LTS.

I finally learned how to install a program called WebStorm and trying to create an alias for it. I tried creating it under ~/.bashrc and ~/.bash_aliases and ~/.bash_profile by reading all the other forums here but none of them worked.

I tried adding alias such as:

alias ll = 'ls -l'

as a test I tried adding them in /.bashrc and /.bash_aliases but each time when I open up my terminal it'll give me an error saying ll is not a command or something but finally adding into /.bash_profile wouldn't give me such error messages.

What I wanted to add as alias is a something like this:

alias ws = '~/Apps/Webstorm/bin/webstorm.sh

but when I run ws in terminal it says:

ws: command not found

but if I just run:

~/Apps/Webstorm/bin/webstorm.sh

directly it'll run the program.

What am I doing wrong here?

1
  • No space(s) around =
    – heemayl
    Mar 29, 2016 at 5:22

1 Answer 1

2

You are trying to do:

alias shortcut = 'long command'

The solution is to not put spaces before and after the =. So it should be:

alias shortcut='long command'
15
  • I just did, but still get the command not found ><" as you mentioned this is what I just did `alias ws='~/Apps/Webstorm/bin/webstorm.sh'
    – Dora
    Mar 29, 2016 at 5:31
  • @Dora So is it exactly alias ws='~/Apps/Webstorm/bin/webstorm.sh'? I think add a bash before ~/Apps/...
    – user423626
    Mar 29, 2016 at 5:33
  • 2
    What happens if you run ~/Apps/Webstorm/bin/webstorm.sh in a shell?
    – user423626
    Mar 29, 2016 at 5:34
  • let me use the laptop with ubuntu installed and copy past the command, but this time I only tried adding the command in ~/.bash_profile instead of the alias one. and if I only run that in terminal, it'll open up the webstorm application which is why I was sure the directory is correct :(
    – Dora
    Mar 29, 2016 at 5:35
  • alias ws='~/Apps/Webstorm/bin/webstorm.sh'
    – Dora
    Mar 29, 2016 at 5:36

Not the answer you're looking for? Browse other questions tagged .