Tim Miller Writes that sometimes, Linux is hard. Amen Tim. This article was written in the middle of trying to compile a 2.4.20 kernel with headers from the 2.4.25. I’m not sure why he was surprised that that situation cause him problems, but then I’m also not sure how nerdy one must become to attempt to not only configure your own kernel, but attempt to directly mismatch kernel pieces. This guy is crazy enough to get a salute from Linux is Hard.
If you run Linux you’ll have to install stuff. Well, you’ll want to at least. There are two main ways that programs are installed on a Linux machine: 1) from source code that’s in a *.tar.gz file and 2) from an *.rpm file. I’ll cover installing rpm files in a different article, right now it’s time to talk about installing from tar.gz files.
If you’ve got a file that is named something like “foo-bar-3.2.11.tar.gz” you can’t just run it. It’s an archive of many files not unlike a *.zip file on Windows (or even on Linux).
How to unpack a tar.gz file:
There are several ways to do this but I’m going to assume that what you want is just to unpack the archive into the same folder that it’s currently in. To do that you should type this into a terminal prompt somewhere: cd /nameofdirectory/where/files/is tar -xvzf foo-bar-3.2.11.tar.gz
What that does:
“cd” is the command you use to change the current directory. If you were browsing through folders on a Windows computer you’d have to go find the right folder before you could do anything to a file. Likewise, in Linux it’s best to go to the folder where your file is before you start doing anything to it (note: ‘directory’ and ‘folder’ mean the same thing).
“tar” is the name of the program that we’re using to unpack this file. Typing the word “tar” means that this is the program you want to run and whatever comes after it will tell it how to run.
The “-” that comes after the “tar” just means that you’re about to give the program some commands about how it’s going to run.
“x” tells tar that you’re going to be extracting files
“v” stands for ‘verbose’ and makes tar explain what it’s doing
“z” is for any file that ends in “gz” because those files have been ‘Gzipped’ (compressed)
“f” forces tar to overwrite files that may already exist (usually this is fine).
“foo-bar-3.2.11.tar.gz” is an example of a filename similar to what you might encounter. You type this at the end of the line.
e extensive explanation, check out this (offsite) Tar Tutorial.
Now that you’ve got all the files extracted, all you have still is a bunch of source code for a program. You can’t run source code just by clicking on something, you have to ‘compile’ it first. Don’t worry, while it sounds like something that only a super-nerd would do, you can do it with two very simple commands.
code you just unpacked
so after you did the tar stuff you’ll want to find the stuff that came out. type: ls
at the same command prompt you’ve been using and see what comes up. If you had a file called foo-bar-3.2.11.tar.gz there should most likely now be a file called foo-bar-3.2.11 - notice the lack of an extension. Most of the time the *.tar.gz file will extract itself into a folder with a similar name. So now type this: cd foo-bar-3.2.11
Of course this is just an example, you’ll want to replace the foo-bar-3.2.11 with the right folder name. Now type: ls
and you should see the files you just extracted. Look for a file named configure.
configure is a file that will prepare the installation. Type: ./configure
That’s ‘dot’ ’slash’ ‘configure’ in case you can’t see it clearly. This should make a whole bunch of random stuff show up on your screen.
Now type: make
more random stuff will show up.
Finally type: make install
and the final batch of random stuff will appear. When it’s done (if it doesn’t show any errors, you’ve successfully compiled and installed a Linux program!
Congratulations, you’re now a seriously nerdy person.
If you spend any time in a terminal, and to use Linux you kinda have to, you’ll encounter some long filenames. More than long even, they’re awkward. Combine this with the fact that Linux is case-sensitive (which means you’ll have to get the uppercase and lowercase right) and you have a bottleneck in your productivity.
It took me a pathetically long time to realize that you could have filenames filled in for you automatically. In order to save everyone else possible the embarrassment of being a try-hard, here’s some info on how to avoid typing long filenames.
Tab autocomplete
If you’re using a terminal, whether logged into your own local computer or some computer far away, whether you’re using ftp or telnet or ssh, you probably are using a shell that supports automatic filename completion. The secret? Hit the tab key
Just start typing the filename and hit tab. If there are two or more filenames that might match what you’re typing, only a little of the filename will be filled in. When that happens, type another character or two to tell the shell more precisely which file you’re talking about and hit tab again.
If anyone has any other tricks that I haven’t posted, by all means please tell me about them in the comments. You can either tell me to write an article on it or just write one yourself and I’ll post it.
While looking for help with my Suse system I just discovered a neat little site that Novell is hosting called Cool Solutions Communities. It’s a pretty good resource for all linux users (they have different sections for newbs and developers) but if you have a Suse system this is totally necessary for you. I still don’t know how to pronounce the name of their distribution, but I love that they help me anyway.
LinuxHelp.net boasts that it’s been in operation since 1997. I recommend it to all Linux users both newbs and pros because of the quality of its forum. There are conversations on every topic and many experts available to provide assistance.
A handy item on the LinuxHelp home page is the current status of the Linux kernel in all of its forms.
LinuxQuestions.org should be your first stop for figuring out how to get your started with Linux. I’d like to imagine that “Linux is Hard” could be as useful, but it’s just not. Whether you need a tutorial on something or just want to ask question on the forum this is the site you should start with. If you need help go there, if you need to be reassured that you’re not a total loser and that linux is always a headache, come to “Linux is Hard.”
Hey, I need help finding other sites that have useful stuff for linux newbs and intermediate folks, could somebody leave a comment with a suggestion?
So you want to run Winamp on Linux huh? Yeah, me too ’cause version 5 is pretty sweet. I’m going to save you a lot of time though by telling you not to even try. Really, don’t try. Instead, just run XMMS. It’s basically Winamp 2.x that was written to work natively on Linux. It functions like Winamp, it looks like Winamp, it even uses Winamp skins! I recommend you stick with it for all of your mp3 playing.
As for video, well I don’t even use Winamp on XP for video much considering how much slower it loads than Windows Media Player, and I’d recommend using one of the default video players for whatever version of Linux you’re running. If you choose to use the Gnome desktop environment you should use Totem and if you run KDE you should use Kaffeine. Both of these are based on Xine which (if you get a regular, full version) includes support for as many kinds of video as windows was ever able to play.
Seriously, if you can jam with XMMS and watch movies on Totem and Kaffeine give props to Winamp but don’t try to take it with you into the Linux world.
Hardware Zone.com reports that PCstats.com has released a new “beginners guide to Linux.” I’ve only read a little of it so far, but if you’re just starting out with linux I recommend you get all the help you can and read this article.
If you’ve ever downloaded software for linux there’s a good chance you’ve seen the acronym GPL. Certainly, if you’ve had to install something by compiling the source code you’ve seen GPL written in something. GPL stands for General Public License and is distributed by the Free Software Foundation. The first thing they’d want you to understand is that they don’t mean the term free like in “free beer” where you get to take what belongs to someone else, more like free as in “free speech” where you are unrestricted in what you’re allowed to do.
The GPL is a text file that is included with many pieces of software that the author wanted to share freely. It’s a license, not a contract as GrokLaw would immediately tell you. That means that it only gives permission to the recipient, it doesn’t also require something of them. For more details on the GPL and to understand the specifics of it, check out Novell’s article on the subject. They’ve recently pounced into the open-source world and seem to have a lot to say.
If nothing else, remember that the GPL is your friend and is designed to give you rights that you wouldn’t otherwise have. Note: this article was written with, compiled by, and web-served by GPL software
Today I came across an old article on OreillyNet written by Kevin Bedel about how we should all migrate to linux. It was written during the MSBlaster outbreak a while back and talked about how, all in all, it would be easier for many people to switch over to linux rather than having to battle worms and apply patches and such.
I don’t fault the intent of the article, I believe we’d all be better off using linux. In fact, I’m writing this on a 2.6.4 kernel laptop right now. However, the agony of reading the article is that it was titled “Linux Made Easy.” There’s something we need to get straight right away: Linux is hard. Period. There’s a lot you can do with it, it’s a better operating system than any other, it stable and productive, but it’s hard - and it’s not going to change.
Why is linux so hard?
The power of linux comes from it’s unique approach to computing. It has a philosophy behind it that is different from the old Mac days and Microsoft Windows at any time. Here are a few of the core philosophies behind linux:
durable code
If you’ve followed the releases of linux distributions you’ll notice how slowly they come out. It’s not that there aren’t enough people (though many are volunteers and cannot be held to a schedule) but most linux software creators do not distribute software that is imperfect without specifically warning people about it’s drawbacks. Almost all software used on GNU/Linux (the official name for most linux operating systems) is released under something called the GPL. It’s basically a legal document outlining that everyone has the right to use and modify the software. (for more info: the GNU project) This is unlike most windows software which is closed-source and consistently full of holes.
one program - one use
If you ever get your hands on Linux and start playing around, you may be struck by how many little programs come with it. If you’re running it right now you can go to a terminal and hit the ‘tab’ key twice. The system should then tell you how many possible programs you can run. On my system I have 3065 programs that do everything from emulating Microsoft Word to calculating free hard drive space. The reason for the large number of programs is that there’s an old Unix axiom that required every program have precisely one function. That way in lieu of writing several programs that were each a grab-bag of mediocrity programmers could hone individual pieces of code to perfection.
command-line interface
And now we discuss the real reason that Linux is hard - the command line. Almost all of these thousands of programs written for Linux require that a person type the program name and then some options for the program at a command prompt. There are GUIs (lookup on Google) for a few programs that allow you to interact with the mouse, but mostly you have to access them through typing.
The command-line interface is one of the greatest strengths of Linux because you can run programs from other programs easily - but it’s also the primary reason that Linux is just plain hard. Linux will one day take over the desktop market, but not in it’s current form. Not until people can do everything with their mouse.
So to Kevin Bedel (Editor in Chief of LinuxWorld Magazine) I say quit with the deception. Linux is wonderful, Linux is powerful, Linux is the future, but Linux is hard.