LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-16-2012, 05:47 PM   #1
slaka
Member
 
Registered: Oct 2012
Distribution: Slackware 14.0 86x
Posts: 43

Rep: Reputation: Disabled
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
 
Old 10-16-2012, 06:01 PM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by slaka View Post
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,
 
Old 10-16-2012, 06:10 PM   #3
slaka
Member
 
Registered: Oct 2012
Distribution: Slackware 14.0 86x
Posts: 43

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Snark1994 View Post
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?
 
Old 10-16-2012, 06:25 PM   #4
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by slaka View Post
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).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running 'bash' question eldiener Linux - General 2 08-19-2012 09:37 PM
[SOLVED] bash running time cristalp Programming 5 09-19-2011 01:22 PM
Running bash but common bash commands not working michellepace Linux - Newbie 11 07-17-2010 09:19 AM
running su from a bash script caminoix Programming 7 12-28-2005 03:41 PM
bash - running before I can walk! Alan Lakin Programming 8 03-11-2004 10:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration