N00B's Guide (Cont'd)
Note that wildcards also work well with the tar command. So if you want to extract many RPM, GZip & BZ2 files, you can also do:
Code:
rpm -Uvh filename*.rpm
rpm -ivh filename*.rpm
tar -jxvf filename*.bz2
tar -zxvf filename*.tar.gz
Normally when you extract files from non binary files (meaning, files other than RPMs), you have to compile them. To compile sourcecode extracted from GZip or BZip files, normally, you do the following:
Code:
cd [folder where files were extracted]
make
make install
The make command establishes binary relations between the libraries used in the files you just extracted. This is almost the same thing as creating the necessary DLL and EXE files from source code.
The make install command places these "dll" and "exe" files in their respective places (same thing as installing a program) along with all the files you just extracted, in the folders they are to be placed. When a program is packaged into an RPM, all of this is automatically done when you do a:
Code:
rpm -ivh (or -Uvh) filename.rpm
NOTE: Linux does not use EXE or DLL files. I merely mentioned them above to give you a sense of what I'm talking about.
The last type of file in Linux is the BINARY EXECUTABLE file. Binary executables don't have an EXE extension - in fact, they oftentimes don't have an extension at all! Also, you almost always cannot run binary executable files using a double-click as you would in Windows. To run a binary executable file:
Code:
cd [directory where file is located]
./filename
The "./" is a Unix operator that loads the file into memory as an executable file. In contrast, in DOS, you can only run files that have an *.exe extension. The memory loading is done automatically in a Windows/DOS environment. Again, this is one of the reasons why I say to you that when working with Linux you have to think differently.
Sometimes when you download a file, you may be required to make the file loadable as an executable. To do this, you need to do the following:
Code:
su
chmod +x filename
The "su" is a Linux command that emulates Super User access rights. You only need to type su if you are not logged into your system as "root".
You can tell which files in your directory are binary executable by listing the directory contents. The most convenient way to list directory contents is by typing the following in your Konsole window:
This lists all the files in your current directory and sorts them into neat columns, grouping together all directories in the leftmost columns. Files are colour coded as to their functions:
Navy Blue/Purple - Directories
Green - Binary executables
Red - Compressed files/packages eg. BZip, GZip or RPM files.[/td][/tr]
White - All other files
There are many more things that you will need to learn about the commands that you use on the commandline. Use:
...to see a detailed manual on each console command that you need to use. That's where your reading will begin, and that's how you will eventually begin to build yourself up to become a Linux guru, step by step. You may also optionally use:
or
Code:
apropos commandname
to give you respectively shorter versions of the same information provided by the man command. Only use the last two commands I mentioned here when you have already made yourself familiar with the detail provided by the man command, or you will be lost.
Well, I'm going to end it here. I think I've armed you with enough information as a newbie to hit the ground running. Remember to do lots of reading and lots of experimentation. And always, ALWAYS remember:
Enjoy your learning experience, and think different.
That's the best part about using Linux.