- Joined
- Aug 2, 2016
- Posts
- 1,611
- Solutions
- 4
- Reaction
- 635
- Points
- 528
Introduction to Linux
Welcome to Linux.org's "Getting Started with Linux: Beginner Level Course". If you're new to Linux and want to find out how to use the fastest growing operating system today, all you have to do is follow these lessons and you'll be using Linux efficiently in no time.
Getting Started with Linux: Beginner Level Course is designed as a self-study course. One of the things that makes this course unique is that at any point during a course, you can add a note, or comment. This is done in the comments bar on the right hand side of the screen. These comments can be made public or private, and can take any form that you like. Feel free to use them to ask questions, answer other users questions, post code updates, or suggest different methodologies for solving problems.
Linux is a very popular operating system, and this course is followed by thousands of people each day. Due to this, there are a lot of people online who are also in the process of learning it. So please feel free to ask any questions that you have and someone in the Linux Community will probably answer you! Also, this whole site, including the courses are regularly moderated. If you don't get an answer to a question, we will do our best to answer it for you. In addition, please send us your suggestions for how we can improve the courses, any typos that you have noticed, or any errors that you have encountered.
If you're ready to start learning about Linux, you may start at our table of contents or you may want to jump right into lesson one What Is Linux?.
What Is Linux
Beginners Level Course: What is Linux?
Linux is an operating system that evolved from a kernel created by Linus Torvalds when he was a student at the University of Helsinki. Generally, it is obvious to most people what Linux is. However, both for political and practical reasons, it needs to be explained further. To say that Linux is an operating system means that it's meant to be used as an alternative to other operating systems, Windows, Mac OS, MS-DOS, Solaris and others. Linux is not a program like a word processor and is not a set of programs like an office suite. Linux is an interface between computer/server hardware, and the programs which run on it.
A brief history of Linux
When Linus Torvalds was studying at the University of Helsinki, he was using a version of the UNIX operating system called 'Minix'. Linus and other users sent requests for modifications and improvements to Minix's creator, Andrew Tanenbaum, but he felt that they weren't necessary. That's when Linus decided to create his own operating system that would take into account users' comments and suggestions for improvements.
Free Software pre-Linux
This philosophy of asking for users' comments and suggestions and using them to improve computer programs was not new. Richard Stallman, who worked at the Massachusetts Institute of Technology, had been advocating just such an approach to computer programming and use since the early 1970's. He was a pioneer in the concept of 'free software', always pointing out that 'free' means 'freedom', not zero cost. Finding it difficult to continue working under conditions that he felt went against his concept of 'free software' he left MIT in 1984 and founded GNU. The goal of GNU was to produce software that was free to use, distribute and modify. Linus Torvalds' goal 6 years later was basically the same: to produce an operating system that took into account user feedback.
The kernel
We should point out here that the focal point of any operating system is its 'kernel'. Without going into great detail, the kernel is what tells the big chip that controls your computer to do what you want the program that you're using to do. To use a metaphor, if you go to your favorite Italian restaurant and order 'Spaghetti alla Bolognese', this dish is like your operating system. There are a lot of things that go into making that dish like pasta, tomato sauce, meatballs and cheese. Well, the kernel is like the pasta. Without pasta, that dish doesn't exist. You might as well find some bread and make a sandwich. A plate of just pasta is fairly unappetizing.
Without a kernel, an operating system doesn't exist. Without programs, a kernel is useless.
1991, a fateful year
In 1991, ideal conditions existed that would create Linux. In essence, Linus Torvalds had a kernel but no programs of his own, Richard Stallman and GNU had programs but no working kernel. Read the two men's own words about this:
Linus said:
RMS said:Sadly, a kernel by itself gets you nowhere. To get a working system you need a shell, compilers, a library etc.
Linux is introducedThe GNU Hurd is not ready for production use. Fortunately, another kernel is available. [It is called] Linux.So combining the necessary programs provided by GNU in Cambridge, Massachusetts and a kernel, developed by Linus Torvalds in Helsinki, Finland, Linux was born. Due to the physical distances involved, the means used to get Linus' kernel together with the GNU programs was the Internet, then in its infancy. We can say then that Linux is an operating system that came to life on the Internet. The Internet would also be crucial in Linux's subsequent development as the means of coordinating the work of all the developers that have made Linux into what it is today.
Late in 1991, Linus Torvalds had his kernel and a few GNU programs wrapped around it so it would work well enough to show other people what he had done. And that's what he did. The first people to see Linux knew that Linus was on to something. At this point, though, he needed more people to help him. Here's what Linus had to say back in 1991.
Linus said:
Code:
Are you without a nice project and dying to cut your teeth on an OS you can try to modify for your needs?... This post might just be for you.
Linux, at first, was not for everybody
Other popular software companies sold you a CD or a set of floppies and a brief instruction booklet and in probably less than a half an hour, you could install a fully working operating system on your PC. The only ability you needed was knowing how to read. Those companies had that intention when they actually sat down and developed their operating systems. Linus Torvalds didn't have that in mind when he developed Linux. It was just a hobby for him. Later on, companies like Red Hat made it their goal to bring Linux to the point where it could be installed just like any other operating system; by anyone who can follow a set of simple instructions, and they have succeeded. For some reason, though, Linux hasn't completely lost its 'Gurus only' image. This is largely because of the popular tech press' inability to explain in a meaningful way what Linux is. The truth is that few tech reporters have real life experience with Linux and it is reflected in their writing.
Where Linux is Today
Today, Linux is enjoying a favorable press for the most part. This comes from the fact that Linux has proven to be a tremendously stable and versatile operating system, particularly as a network server. When Linux is deployed as a web server or in corporate networks, its down-time is almost negligible. There have been cases when Linux servers have been running for more than a year without re-booting and then only taken down for a brief period for routine maintenance. Its cost effectiveness has sold it more than anything else. Linux can be installed on a home PC as well as a network server for a fraction of the cost of other companies' software packages. More reliability and less cost - it's ideal.
If you're reading this, you're obviously here to learn how to use Linux. Any learning experience means opening up to new ideas and new ways of doing things. As mentioned before, Linux is in the UNIX family of operating systems. UNIX is primarily designed to be used by professionals. You will have to learn some UNIX concepts in this lesson, but that doesn't mean that Linux is a professionals-only operating system. In fact, most major versions of Linux are designed to be as user-friendly and as easy to install as any other operating system on the market today.
Now that you know what Linux is and how good it is, there's one more thing we have to do - install Linux!
Installing new software (Debian, Red Hat, Slackware)
Debian:
There are various methods to installing new programs on a Debian system. I like to classify them according to your connection type.
Code:
dpkg
Code:
dpkg -i package.deb
The main drawback to this is that you may find a package that you like but it may have dependencies (ie. other programs that it needs to make it run) and if you don't have those packages, then the install will fail.
This is what the Debian people themselves have to say about this method:
Many people find this approach much too time-consuming, since Debian evolves so quickly -- typically, a dozen or more new packages are uploaded every week. This number is larger just before a new major release. To deal with this avalanche, many people prefer to use automated programs.
Despite what they say, the main advantage of dpkg, it seems to me, is that it is easy for people who have dial-up connections. This is because the alternative, automated programs they're talking about, which are dselect and apt-get are better for permanent connections (cable, xDSL, T1, T3). Let's talk about this method of installing new programs with Debian.
Code:
dselect
When you use dselect you get a graphic user interface of sorts (not under X window, though) to guide you through the install of new programs.
First you'll get asked for your preferred access method. That means, how you're going to get and install them. For example, if I were doing an install of Debian with CDs, then I would choose CD-ROM. But if I were updating, I would choose FTP
Then you would choose the packages you want with a + sign. You can even put updates on hold (indicate that you want to update, but not actually do it) with a = sign. There may even be conflicts or dependency problems and 'dselect' will warn you about those.
Then you start the process by choosing the install option.
Debian will then configure the installed packages.
Then you're on your way.
As I said before, the main advantage to this is that any conflicts or dependency problems will be resolved right here. The Debian people point out that this is ideal for installs or large-scale upgrades. If that's the case, it seems that a slow and sometimes expensive dial-up connection would be less than ideal for this.
Red Hat:
The way you install a new program will depend primarily on two things:
1) What distribution (version) of Linux are you using?
2) What is the origin of the program that you want to install?
RPM
If you're using Red Hat or a distribution that bases itself on Red Hat, then you're going to use the RPM method. OK racing fans- RPM doesn't have anything to do with revolutions per minute. It stands for Red Hat PackageManager. This system takes the heartache out of installing programs under Linux, for the most part. You can go to the Red Hat website or any number of mirrors and get programs for Linux. Developers will almost always offer their programs in RPM format due to its popularity. I also want to note that RPM has also come to mean the package itself (as in \"I downloaded an RPM yesterday\".
There are some basic commands you're going to need to know to take advantage of the RPM system.
Code:
rpm -i new_program.rpm
Code:
rpm -q program_name
Code:
rpm -q opera
opera-11.62
If you don't have the package installed, you will see:
package opera is not installed
If you don't have Opera installed, then you can download their RPM and run rpm -i opera_whatever_version.rpm as root and install the program.
If you do have the program installed and the rpm -q opera command gives you a older version number and you want the newerone, then you have two options.
One is to "uninstall" the older package and install a new one in its place. Not that this is the most efficient option. I just wanted to introduce you to the -e option for RPM. That is, to get rid of a program that you've installed, you would type rpm -e program_name. For example, if you've got Opera's beta version 7 and you've just downloaded the beta version 8, then you would first do:
Code:
rpm -e opera
As I said, this is not the most efficient way to update packages. The usual way is to use the -U (as inUpdate command.
You would type:
Code:
rpm -U opera_new_version.rpm
Those are the basic commands of the RPM install/update system in a nutshell.
When you're using your windows manager, there are some very good tools for installing, updating and uninstalling RPMs that are graphically based. You can choose menu options to do all that we explained before instead of having to type the commands in the terminal. You may want to look into programs like Kpackage for KDE orGnome RPM for the GNOME enviroment. They may make these tasks a lot easier, especially if you're just starting out in the Linux world.
Some words of caution on downloading RPMs
Some of the most popular Linux distributions base their install and update prodedures on Red Hat's package management system. These include Mandrake and SuSE for example. Both of these companies create their own RPMs to be specifically installed on their systems. That means if you're using SuSE or Mandrake your best bet is to go to their respective \"official\" websites or mirrors and download their particular RPM and install it using the procedure outlined above or their specific tools. You may run into a problem if you installed an RPM for Red Hat on a SuSE system. Certain components in the package (like documentation or libraries) may get copied into a different directory than was intended for that system. Third party RPMs from reputable companies, like the Opera web browser in mentioned above, should install fine on any RPM based system. I have successfully installed this package (the same exact RPM file) on SuSE, Mandrake and Red Hat. I even converted this RPM to Debian (.deb) package format and successfully installed it in a computer running Debian. More on this conversion later in the show!
Just a brief second word of caution. Getting and RPM doesn't necessarily mean that you're automatically (or "auto-magically") going to be able to install it. Many websites out there offer RPMs for download. The good ones usually include a list on that particular RPM's page of other programs or libraries that you need in order successfully install and use the program. If you see a list a mile long of "requirements" (those other programs and libraries you need), then you might want to ask yourself if you really want to try that program out.
And here's just an editorial comment on my part about this type of thing as well. The big buzz word with Linux is "free". That's fine. You can theoretically get a distribution from the Internet along with programs and install it for free. (ie. no money down). I think, however, that time is money, to use the trite expression. Time might be even more valuable than money. (lost money might be re-earned but not lost time). When I first installed Linux oh so many years ago, updating and installing stuff was at times a frustrating experience. I suggest that newcomers to the Linux world buy (yes, I said buy) a good boxed set of a commercial distribution and then they'll have more programs than they would ever need, all installed and working properly along with a manual to tell you what to doin case something doesn't work.
Code:
yum
Yum uses a configuration file at /etc/yum.conf.
There are multiple ways by which you can install a repository on the system and install/update packages :
Code:
yum search package_name
yum info package_name
yum install package_name
yum update package_name
yum remove package_name
Slackware, known to the Linux world as \"Slack\", has the reputation of being, on one hand, a flexible distribution that allows you to do practically anything you want and, on the other hand, one that is for "experienced" Linux users only.
A lot of these considerations are "politically" motivated. Slackware lacks some of the "smooth" and "slick" graphic installation packages that are becoming standard fare in commercial companies' offerings but in the end, if you're willing to just use the command line utilities, it's just as easily updated as any other major distribution.
Slackware's package format
Slackware packages come in *.tgz format. This a variation of the *.tar.gz format we've seen before. You can go to your favorite website and download new programs for your Slackware system and with a simple:
Code:
installpkg some_program.tgz
If that particular package doesn't quite move you and inspire you too much, you can just remove it:
Code:
removepkg some_program.tgz
Upgrading packages
You can upgrade programs to newer versions with this command:
Code:
upgradepkg a_new_version_of_something.tgz
If you're using Slackware and you can't find a package your looking for in the *.tgz format, you can also grab on to an *.rpm and convert it.
The way to do this is:
Code:
rpm2tgz some_package.rpm
GUI does not necessarily = GOOD
Once again, there is a common misconception that just because something doesn't have a wonderful graphic interface that makes you say \"oooh\" and \"ahhhh\", it is somehow inferior. Don't let that missing GUI fool you here. A computer running Slackware is a tremendously flexible and configurable system. So what if you have to write things on a command line? That's what you've got a keyboard for, isn't it?
Enjoy your Slack system!
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.