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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am a newbie. But man, how do some of you people know so much! I read lots of HOWTO's, the man pages, all the documentation. Is there some magic handbook everyone else is reading and Im not allowed to see? I was amazed when I installed Slackware 9.1 on my very first try. Now Im doing other things and needing help, but the documentation I've come across lately has been very frustrating. For example, I'd like to learn how to compile source. The HOWTO I came across, man they assume i know what a " linking stage" is. I guess im just whining about the fact that I havent come across a more newbie friendly series of HOWTO's, with out going as elementary as "This is a terminal, this is a prompt.". I think learning from example and by actually doing it is the best way, but all the examples ive come across in HOWTO's just give you steps, they don't explain what the step is doing, ect. And with all the different distros and things you may need upgraded or not, dependancies, ect, I always feel like theres going to be something missing in those steps for my install. Ok I'm done whining. But before I go, 2 things I need a point in the right direction (hopefully its NOT a HOWTO)....
Compiling the 2.6.5 Kernel. Think I have 2.4.X now.
Compiling Source, all those Make commands, that whole process.
Install new kernel. If your still with me at this point, I'm thinking that you might be a lot like me. You know there is something new and better than what you have out there. Why else are you using swaret to upgrade you to the latest and greatest every day? So you probably want to check out the new 2.6.5 kernel. Here's how I do it, and it has worked like a charm every time.
Maybe, like I was the first time, you are a little nervous and want to make sure you get everything just right. I do all of my kernel upgrades right inside Gnome. It just seems easier to me. First off, you need to get the new kernel. Crank up the favorite browser and point it to http://www.kernel.org/pub/linux/ker...x-2.6.5.tar.bz2 . If your setup is like mine, your going to get a pop-up window asking you where you would like to store this bad boy. A real good choice is /usr/src . After it finishes, use your file manager to open up /usr/src . Double-click on the package that you just downloaded. That will open up file-roller. Click on extract. Make sure that the re-create folders option is checked and click ok. You'll now see a new folder (linux-2.6.5) in /usr/src. While your looking, you should also see a folder with a shortcut mark named linux in /usr/src. Go ahead and delete that folder. Now, right click on the new folder that you created a second ago (linux-2.6.5) and pick "Make Link". There is a new folder now named "link to linux-2.6.5". Right click on that folder, pick rename, and change the name to "linux" (no quotes). Wow, we are moving right along here.
Now we are going to open up a terminal. Type "cd /usr/src/linux" Now we are going to type "make gconfig". As if by magic, you should see a new window pop up that is named "Linux Kernel v2.6.5 Configuration". You are going to go to that window and click "Options". Then, you need to make sure that the "Show all options" is checked. A lot of people leave that out. It's a lot easier to miss something when you don't have that checked. You see, the menus will usually only show you options that you are able to select. Some options require other options in order to work properly. As you go through the list, you may think that you've selected all of the options you need, but some obscure option is missing. That's because as you worked your way down, new options were appearing ahead of you that you knew nothing about. I try to avoid that type of situation by clicking on the "Show all options" button. It also helps to go throught the entire menu about three times. Might seem like overkill, but it sure does scuk if you don't find out you missed something until your new kernel refuses to boot.
Now comes the most difficult part. Every computer is different, so I can't offer tons of help here. I definately recommend that you click on every single choice and read the help that is printed about it. I follow all of the recomendations that they make as to including an option or not. One thing I can say is that you should definately choose your processor and you should probably also choose the preemptible kernel option. Also, I always choose the "Prompt for development and/or incomplete code/drivers". Some more tips? Make sure you don't cofigure your filesystems as modules. You'll need the filesystems (at least one of them) a long time before your computer ever gets around to loading modules.
Anyways, spend a long time going through all of those options. If in doubt, don't leave it out. If everything works for you and you think you have a bunch of stuff you don't need, you can always recompile later. Beats the alternative of not being able to boot your new kernel. That gaurantees you will be recompiling, ya know! When you are happy with all of you choices, go ahead and click "File" and "Quit". You'll be asked if you want to save your changes. Say yes and all of your choices will be stored in a file named /usr/src/linux/.config . Of coarse, since /usr/src/linux is a link to /usr/src/linux-2.6.5, your file is really saved as /usr/src/linux-2.6.5/.config , but don't let that confuse you a bit.
We are on easy street, now. No more choices!!! Go to that terminal you have open. You should still be in /usr/src/linux (or /usr/src/linux-2.6.5 , It's the same thing). Type "echo 'You are almost done'" and press enter. You should get a motivational message. Now type "make bzImage" and watch the text fly by. When the text finally stops (it could take awhile) you need to type "cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.6.5". Now what I like to do at this point is use my file manager to look in the /boot directory. You should see vmlinuz-2.6.5 in there now. You'll also see vmlinuz-2.4.22, I believe. There is also a file, vmlinuz, which is a link to vmlinuz-2.4.22. Go ahead and delete /boot/vmlinuz. Now right click on /boot/vmlinuz-2.6.5 and pick "make link". Rename the link /boot/vmlinuz.
Switching back to that terminal of yours, type "make modules". After all the text finishes blowing past you, type "make modules_install". Now type "cp System.map /boot/System.map-2.6.5", and then "cp .config /boot/config-2.6.5". Now those two files aren't gonna be doin' anything for us with those names. I just like to give them names to keep track of which kernel goes with which files. You're going to need some symlinks. You can do like I did earlier with the file manager, or you can just type "ln -s /boot/System.map-2.6.5 /boot/System.map" and "ln -s /boot/config-2.6.5 /boot/config".
Now your new kernel is all in place. All you've got to do is tell LILO about it. Open up /etc/lilo.conf in you favorite text editor. See the part that looks like this:
# Linux bootable partition config begins
image = /boot/vmlinuz-2.4.22
root = /dev/hda2
label = Slackware
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends
You're going to need to copy all of that and paste it at the end of the file. Then, change the line that reads "image = /boot/vmlinuz-2.4.22" to "image = /boot/vmlinuz-2.6.5" on the section you just pasted. Also, you need to change the new "label = Slackware" to something catchy, like "label = Slackware-2.6.5". Now, I could really be messing you up here. If LILO originally pointed you to vmlinuz-2.4.22, then everything is peachy-keen. If, on the other hand, it only pointed to vmlinuz, you'll remember that we changed that and made that a shortcut to vmlinuz-2.6.5. That would leave us with two choices both pointing to your new kernel. Not good if there are problems with the new kernel. Make sure that your first choice is pointing to the kernel that is running now. It should be in the /boot folder, if your having trouble figuring it out. Got that all? Save the file and let's roll.
Well, now. Go back to your terminal and type "/sbin/lilo". Make sure you didn't get any error messages. Reboot. You should have a couple o' choices, like maybe Slackware or Slackware-2.6.5. Pick the Slackware-2.6.5. Everything work? Good. If you've been following along, everything should be in graphical mode. OH, SNAP!!! I've got the Nvidia drivers, and they don't work with my cool new kernel. Oh well, easy enough to fix. Ctrl-alt-f6 takes me to a console login. I already have the Nvidia installer from when I installed those puppies the first time. You didn't delete them, did you? Great, just go to the directory that you put them in and type "sh NVIDIA-Linux-x86-1.0-5336-pkg1.run". Everything should be right in the world now.
there's a huge thread here on compiling 2.6.x kernel. maybe even more than one, come to think of it.
briefly for your other question, the process for most programs is like this:
$ tar -zxvf program.tar.gz
$ cd program
# make install
if that doesn't work or gives you problems, the next thing to do (or better, the first thing ) is:
$ more INSTALL
$ more README etc.
and read what you need to do for that particular program.
and always read the error messages when something faills. nine times out ten the information (or sometimes just a clue) you need is there.
if the errors are complaining about paths and pkgconfigs and libraries and stuff that it can't find but seems like you should have, try:
$ ./configure --help (read options)
$ ./configure --enable-option --disable-option --with-thing-to-add --x-includes=/ (etc.)
# make install
sometimes a program doesn't take a ./configure, but just a make and make install, or a make user, make user_install, etc. that's when it helps to read the INSTALL.
a good thing to read is the Rute manual. that will get you started pretty well. also check out the linux newbie administrator guide (i think it's called), and anything by O'Reilly, and some of the red hat docs are really good. or search google.com/linux, there is a ton of material out there to read. and don't forget the man pages, which is a good idea to get in the habit of reading. after a while you can usually scan through them pretty quickly for the info you need.
Compiling programs from source is one of the Linux pro's, since you can obtain software specifically made for your computer configuration. That saves disk space, memory usage and improves general performance. The better example of compiling is the kernel compiling.
Nevertheless, some applications need to be compiled (since the programmer or developer published it as source) or run better if compiled. Some distributions are made around the concept that compiling is better (i.e. Gentoo). That's good if you have a good processor, time and patience. You'll obtain a completely customized Linux box running uber-great. But if you don't have time, you have to use packages. There are two package type: the RPM (Red Hat Package Manager) and the APT (Advanced Package Technology).
You probably download or obtain source programs in a gzipped tarball or a bz2ipped tarball. A tarball is kind of a folder with files within and gzip and bz2ip are compression types. People says that bz2 is better, but gz is the most available out there.
When you install packages, you need other packages which fulfill the software dependencies of the one you want to install. In a analogy with Windows, that's when you install a program which asks you for *.vxd or *.dll files to be instaled. APT and RPM solves that problems since they have great dependencies resolution. APT goes deeper, because they is a tool called apt-get which automatically resolves dependencies and contact the Internet to download the needed packages.
When you compile from source, you need to know what other programs or libraries the software needs. It's important to read (don't follow those that say "Don't be a fag, skip the README's") both the README and INSTALL file of the untarred (that means unpackaged) file, and the webpage if you're downloading from the Internet. You will then see what you need to compile. In some cases they even say you what you have to type in order to see what you have or what you don't.
If you are sure you have everything (which generally is the gcc compiler, that's GNU C Compiler, and some libraries) you can compile and you will have almost no problem. Most of the software distributed as source has a configure file. That means the developer has told the program to check what it needs to install. You can run this step doing ./configure. If the command gives no errors, you can proceed to the actual installation. This is usually done typing: "make install" (however, always read)
If you have errors you can check the ./configure output (that is, what you read at the screen) and determine if you have something missing or that there's a bug in the program (rarely). Once you have solved your dependencies problem, the program will "make" without any problem.
Reading is a must. I tried to compile "mplayer" (a Linux multimedia player) months ago without reading about it's dependencies. I tried for weeks and then I realized a library was missing. Once solved, ten minutes of compiling gave me a powerful, rock-solid multimedia player which I now use to play all kind of audio, video and streaming files.
Finally, there's no magic handbook. Linux is an operating system which has found to be great for learning informatics, computing and networking, since you need to learn by yourself. A few tips I can give you are:
a) If you constantly use a command and don't really know why, check it's man page: "man command"
b) If you have errors running system, copy and paste the line of the error (or the last line of the program before "crashing") into Google
c) Looking at HOWTO's is fun, but it can be boring if you don't devote completely and it might end in a complete disaster.
d) Use your console frequently. The graphical user interface (GUI) makes us unaware of what's happening internally and that could be frustrating.
e) Try answering or giving tips to full-newbies questions here or elsewhere. It helps a lot.
You guys are quick. Real real quick. That first post, about the kernal compile, I had actually printed out earliar today, I think thats what got me started here (having that no sound issue after running swaret and i read the new kernel solves it), its a pretty good guide but I guess I was just wimping out and needed some cheese with my wine. I went ahead and leeched that Rute manual, I flipped through it and it seemed to be doing exactly what I was looking for, explain things with out assuming you know other things that are going to need just as much explaining. And thanks for that primer on the whole Make process. I actually own the oreiley book " Linux in a nutshell" but its more of a quickie lookup guide for people who know what theyre doing, rather than a " read me from cover to cover and you will know" book. Im going to check this running linux book. Slackware, man, this is bad, im getting sucked into it, i just feel the urge to get nerdier and nerdier with it, and its like I cant stop. Ok im off to go try to compile this kernal (my first one ever!), thanks again guys, all of you.
don't let the penguin beat you up too much.......LOL
that RUTE users guide is xcellent reference tool........get a copy and save
locally so you'll always have it around!!!
here is a good link also.......bookmark it!!
BTW, I hope that RUTE guide that I just posted a link to doesn't cost any money. I don't think it does, but I have no idea so if it does please let me know and I will edit the message. But other than that, would that be the guide you guys are talking about?
Ummmmmmm No... Some people provide illegal links, Warez for example. It could be that someone purchased the ebook and then posted it on the site. It does happen. (I know that you can't get charged for something if you don't put a credit card number in there, etc... I'm no idiot!)