creating your own text commands to start programs in Terminal?
How do you create text commands to start programs from xterm?
i.e. if I want to start mozilla just by typing mozilla into the terminal, how would I go about doing it? I think it has something to do with bash but I dont know. |
That is all you do to start mozilla, is type 'mozilla'.
But, I think what you're looking for is Bash shell scripting... Click here for that... |
You can edit your .bash_profile file. Then you can make custom commands like this:
alias flux = "startx && exit" For normal programs it's usually just the name of the program you want to run. Use tab for the autocompletion if you don't know. It's really useful. |
Every user has a path which is a list of directories to look in when the user tries to execute a program. you can add a soft link of the program binary into /usr/bin or something, which is in every users path i believe and then just typing the name of the file will run it, like mozilla.
Is it mozilla or firefox? either way you could try which <program> That will tell you if it's already in your path or slocate firefox if the above comes up empty then echo $PATH will show your path and you can pick a suitable one to link the mozilla binary to. Also note that if you just type mozilla it'll hog the terminal session and you won't be able to do any work in that particular one. mozilla & will run mozilla in the background and keep the terminal free |
All times are GMT -5. The time now is 04:38 PM. |