System utilities such as ls don't need to have the full path typed before executing them. However, to execute Netbeans, I have to type /home/chris/netbeans-7.0.1/bin/netbeans. How can I make it so that I only have to type netbeans?
Asked
Active
Viewed 1.4k times
5
Casebash
- 6,059
3 Answers
8
An easy way is to place a link in /usr/local/bin:
sudo ln -s -T /home/chris/netbeans-7.0.1/bin/netbeans /usr/local/bin/netbeans
after that you can execute netbeans with:
netbeans &
Michael K
- 14,338
4
You can add an alias
Open Terminal Ctrl+Alt+T
nano ~/.bashrc
write this at the bottom of the file:
alias netbeans='/home/chris/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, or type
. ~/.bashrc
Ivan Dokov
- 812
-1
- go to the program directory.
- open the terminal using ctrl+alt+T.
- Drag and drop the program file to the terminal windows.
- Hit enter on the terminal windows.