Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Okay, so you would open the terminal, go to the directory with the tar/gz/bz2 file, and execute the right command for that file type to decompress it? and then if it's the source code, you compile it/install it, or if it's then just an RPM, you double-click it to install? or run the command: rpm -ivh <filename>.rpm ?
When compiling the source code for a program, do you open the terminal, go to the directory with the decompressed source code, and just type the commands:
./configure
make
make install
? or do you have to specify the source code? Asking just to be sure :-P.
A lot of good questions with great response! To the OP, I would suggest that you read some online reference to get some background.
Linux Documentation Project is a good place to start. You will find just about everything but the kitchen sink covered at this site. Well maintained and informative!
Again, thank you very much! you guys are the best .
@Ace - Thanks for the clarification, really helps s like me .
@Elf - Had a couple questions,
1. What is $PATH? and what is a "man page"?
2. Do you mean I should type "./configure --prefix=/usr" to tell it where to be installed? and did I understand how to type the command correctly?
@OneBuck - Thanks! I greatly appreciate the links and help .
@Chris - Wasn't too late at all, was a good read, and probably would've scared me off if I'd read it when I first began dabbling in Linux .
a man page, is a manual page, for example if you type
man cd
it will tell you how to use the command cd, they are very helpful and if you have any questions about commands you should check with them first
The best way of locating applications on your system is using whereis or which followed by the name of the application.
The path is a series of directories that the system can search for commands/executables without the user needing to specify anything. In other words, if you path includes /usr/bin, the system will automatically detect the applications that are stored or linked there. If the launcher for application is stored outside the path, the user has to specify the full path on the command line. For example, if you install firefox in /opt, you'll need to specify /opt/firefox/firefox.
Listing the contents of the path goes: echo $PATH
.configure --prefix =/usr is something that you'll rarely need. It is something of a standard that compiled source gets moved to /usr/local with a link in /usr/local/bin. And the latter is included in the path of most distributions so no problem there.
What does .configure do? It checks whether you have all the required libraries to compile your application. If you haven't, it will abort and print a message indicating what is missing. Then it's up to you to figure out what it means, install the library yourself and re-run configure. On a system that has hardly been used to compile anything, you should expect this to happen a lot. Best option: always read the README and INSTALL files in the source directory as they usually detail what is required to compile.
@Jay - Do you mean I can type "whereis ProgramName", and it will list the location of it? and then to run it, rather than just typing the program name, I have to place the folder string before the name, so that it knows to open the folders all the way to it, and then it?
Also, don't quite understand your explanation of the ".configure --prefix =/usr" command.
You can also try
which prog
or
locate prog
As said, the shell var $PATH contains a list of known directorires that your cmd shell will search if you try to run a cmd without giving it the full path to the program. In most cases, that'll be fine.
and then to run it, rather than just typing the program name, I have to place the folder string before the name, so that it knows to open the folders all the way to it, and then it?
That is something you can do, yes. For example, you can simply type firefox or you can type the full path /usr/bin/firefox. As pointed out by others, if the path to an application is in your $PATH, just the name will do. As I pointed out in my previous post, type
echo $PATH
and it will list all the directories it can search automatically.
Things outside the $PATH are unknown territory, so your system can't find anything there unless you either show it the way by explicitly passing the full path on the command line or you add it to $PATH. For example, if you have an application in /opt/bin that your system can't find because /opt is not in the $PATH, you do this:
export PATH = $PATH:/opt/bin
This will include /opt/bin in the path environment variable. Now you can start apps located in /opt/bin by simply typing their name. Do bear in mind that your changes to $PATH last only as long as your session - log out and the changes are lost. If you need them to be permanent, you have to add the export PATH = entry in /etc/profile or the user's (bash_)profile.
Quote:
Also, don't quite understand your explanation of the ".configure --prefix =/usr" command.
In short, don't use it unless you know what you are doing.
You should look at the Linux Shortcuts and Commands: and LINUX NEWBIE ADMINISTRATOR GUIDE guides. These guides will give a good understanding of the commands and usage. Along with the 'man' pages, you should get valuable experience with the commands.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.