LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bash and running (https://www.linuxquestions.org/questions/linux-newbie-8/bash-and-running-4175432586/)

slaka 10-16-2012 05:47 PM

Bash and running
 
Hey,
I tried to google answer to this one but I'm not even sure how to describe this to google -- so wasn't able to find.

So when I install programs it seems that I can run some of them by typing simply 'program' into terminal.
How they are made, how to modify 'em, what are they, what are they called?

edit: just in case, running slackware 14.0

Snark1994 10-16-2012 06:01 PM

Quote:

Originally Posted by slaka (Post 4807618)
How they are made?

Most of the programmes you'll have are compiled C/C++ programmes, but you may have a couple written in other languages (e.g. quodlibet and fontypython are both written in python, xmonad is written in Haskell)

Quote:

How to modify 'em?
The short, simple and incorrect answer is "you can't".
The longer answer is "It depends on the type they are"
The longest answer is "Scripted programmes (e.g. those written in python) are easily altered if you know how to use the language. Compiled programmes (e.g. those written in C/C++) need you to find and download the source code, recompile it and replace the binaries with your modified ones."

However, I can't really see any reason why you would need to do so.

Quote:

What are they?
I think we've covered this one, or else I'm misunderstanding you.

Quote:

What are they called?
If it's compiled, a binary, if it's not, a script. More generically, you might just call them a 'programme'.

Hope this helps,

slaka 10-16-2012 06:10 PM

Quote:

Originally Posted by Snark1994 (Post 4807630)
Most of the programmes you'll have are compiled C/C++ programmes, but you may have a couple written in other languages (e.g. quodlibet and fontypython are both written in python, xmonad is written in Haskell)



The short, simple and incorrect answer is "you can't".
The longer answer is "It depends on the type they are"
The longest answer is "Scripted programmes (e.g. those written in python) are easily altered if you know how to use the language. Compiled programmes (e.g. those written in C/C++) need you to find and download the source code, recompile it and replace the binaries with your modified ones."

However, I can't really see any reason why you would need to do so.



I think we've covered this one, or else I'm misunderstanding you.


If it's compiled, a binary, if it's not, a script. More generically, you might just call them a 'programme'.

Hope this helps,

Thanks for answer :). Incredible effort for newbies for free, kinda nice TBH.
I was also looking how they can be added to terminal/bash (whatever) so they can be started from terminal by typing their name.
For example I'm able to start wine by typing it in terminal or 'winecfg', 'alsamixer' etc... so where they are located?

Snark1994 10-16-2012 06:25 PM

Quote:

Originally Posted by slaka (Post 4807637)
Thanks for answer :). Incredible effort for newbies for free, kinda nice TBH.

No problem :) always glad to help.

Quote:

I was also looking how they can be added to terminal/bash (whatever) so they can be started from terminal by typing their name.
For example I'm able to start wine by typing it in terminal or 'winecfg', 'alsamixer' etc... so where they are located?
Right, to find where they are:

Code:

whereis alsamixer
To add your own files to them, you need to put them in /usr/bin. However, it might be a better idea to add the following to your ~/.bashrc:

Code:

PATH=$PATH:$HOME/bin
export PATH

and then put the files in ~/bin. That way you know exactly which ones you've added, and which ones were there before (there'll be loads of them in /usr/bin).


All times are GMT -5. The time now is 11:27 AM.