How can I make it so I can run a specific program, just by typing its name in the console?
This can be crudely accomplished with an alias. You can create a permanent bash alias by adding a single line to your .bashrc
file.
In the terminal run nano ~/.bashrc
Add the the following line at the bottom:
alias LightTable='/full/path/opt/LightTable/deploy/LightTable'
notice I added thee full path instead of the .
so this will work in any working directory. Close and reopen the terminal or run source ~/.bashrc
to reload the bashrc file.
This isn't an elementary question, the best way to do this is to make an alias, Ill use netbeans as an example
Open Terminal Ctrl+Alt+T
nano ~/.bashrc
write this at the bottom of the file:
alias netbeans='/home/john/netbeans-7.0.1/bin/netbeans'
Ctrl + x
Y
Enter
The netbeans word is the command you will use to start the program, you can change it to whatever you need. Inside the quotes is the command you want to run when netbeans alias is called.
In order this command to be active you have to re-open the Terminal
You can try to copy the executable to /usr/bin
if its a simple executable program and doesn't depend on any other file. if it does depend of other files, the best to do is create a shortcut command to the program.
Where you create the alias is by yourself (.bashrc, .profile, etc). However I personally let all my enviroment variables in my .bash_aliases
file (you need to create it at first stance).
Create the file .bash_aliases in your HOME folder and edit it anyway you like. Then to create the shortcut, you can do:
alias LightTable='path_to_opt/LightTable/deploy/LightTable'
Save the file and that's it.
ps: you can also put the alias as lighttable and LIGHTTABLE in case forget to uppercase the L or if capslock is active by accident, so you don't have to type the command again.