Running Commands
First i am a noob. I am trying to digest Linux as much as possible.
I am experimenting it using short tutorials people have written. I have a annoyance though. Many commands that I know are there will not run when I am logged in. I have to always do a whereis command to find the command and then type in the full path name to execute the command. How can I avoid this and just type in the commnad from any location to get it to run? Also when you look at a file, how do you tell if it is a commnad or just a file from the GUI interface. I knwo you can check the file and see if it has x bit turned on. But how do you there are commands or not. As an example, after you install a program into a directory you get a huge list of files in that directory. how would you know which file is the executable to run the program? Thanks |
Quote:
Most distr. have a special icon for apps. Quote:
|
First check your path with echo $PATH. Add directories to the path by editing .bashrc or .bash_profile in your home directory. Alternatively, create links from your programs to a directory already in your path, eg /usr/local/bin like this:
ln -s /my/directory/my_prog /usr/local/bin You should now be able to run rhe progs by just entering their names. |
As an Example when i type ifconfig it will say error command not found. So I do a whereis ifconfig. I then have to type /usr/sbin/ifconfig to get the command to run.
So in order to just be able to type the command without the full path name I have to edit the .bashrc file? What kind of entry would I have to do? I have tried using the sysm link with firefox and it works from command line now. But how can I run the programs from a GUI? Right now the only way I can run Firefox is through the command line. I have no shortcut for it in my programs from my desktop so I have no idea on how to run programs excpet through the command line? How do I do this? Thank You |
thats what i expected.
the sbin folders contain commands that are supposed to be used only by root and are added only to roots path. if you are a user use su - (not just su) to get a root prompt, and u will have sbin in your path. You may also use Alt+Ctrl+F1 and then login us root .u will probably have those commands in your path. (switch back to X-windows with Alt+Ctrl+F7) type : echo $PATH or env | grep PATH to see what directories are in your path (as normal user and as root to see the difference) |
Quote:
pick a name, a generic name and in the command field type firefox. pick an icon if you like. I don't use KDE but i think u can do that by right clicking new->application or something like that. |
Thanks you. That solution worked for me to place icon on my desktop. I am using Gnome.
but whe But it is not working when I am trying to put the command in my Internet Appilcations Menu. I add the item but when I try to save it it gives me an error. I would like to make custom folder with applications and scripts I might use to be accessible from the menus on the right hand pull up. I would like to create and customize m,y folders over there and then but my Applications in those folders instead of using the defaults. I am using Red Hat 9. Thanks for all the help Linux Community |
All times are GMT -5. The time now is 01:51 PM. |