Learning More About Linux? 184
teh moges asks: "From an administrator point of view, I know a lot about Microsoft Windows: where files are stored, where settings are, which registry keys to edit, how to change drivers, and so on. I made the initial switch to Linux a year ago. I now feel capable enough with using Linux, from an end user's point of view, so that when things go wrong, I can fix them. I now want to become even more familiar with Linux. Are there any great resources, such as websites, wikis or books for someone that wants to find out exactly how Linux works and how to fix and modify it?"
Only thing to understand... (Score:4, Insightful)
No magical black box registry, windows drivers, etc. Once you understand this, other things will come easier.
Re:Only thing to understand... (Score:5, Funny)
Can you be more specific about the files please.
Re: (Score:2)
The Gnome implementation of a registry consists of a tree of XML files.
Re:Only thing to understand... (Score:4, Informative)
Re: (Score:2)
Exactly. If you really want everything to be a file, you need to use Plan 9 [bell-labs.com] instead.
Re: (Score:2)
Are you sure Linux really isn't a series of tubes?
On a slightly more serious note, many aspects of Linux are documented, perhaps a starting point for what you want is the "Filesystem Hierarchy Standard". The name has changed a time or two, and I don't exactly know the latest, or the acronym.
Re: (Score:2)
No magical black box registry
Can you say, "sysconf?" Or theRe: (Score:2)
I can't think of many ways that /proc is similar to Windows Registry... would you care to enlighten me? I can think of many ways they are not similar... The fact that userland programs do not store persistent information in /proc is the first thing that comes to mind.
Even /etc/* is more like Windows Registry than /proc is.
Re: (Score:3, Interesting)
the
And you know what? Everything in it shows up as (wait for it..) files - which was kind of the point of the message you replied to.
Re: (Score:2)
Re: (Score:2)
Since when did the output of ls look anything like Windows Explorer? And that's the point -- everything shows up as files in the sense that they can be operated on with normal utility programs that work on files, like ls, cat, grep, etc.
Re: (Score:2)
Does that mean that I can do a cp /proc /proc2 to turn my single-core processor into a dual-core? Somebody should tell Intel and AMD that it was that easy.
/dev. How many hard drives do I want...
Ohhh. The fun I could have copying the stuff in
Re: (Score:2)
Does that mean that I can do a cp /proc /proc2 to turn my single-core processor into a dual-core?
No. But /proc is a filesystem
And I can get a snapshot of the contents of that filesystem
although a few files fail due to permissions, etc.
Ohhh. The fun I could have copying the stuff in /dev. How many hard drives do I want...
No, because the hardware does not exist because the file exists, rather the file is present because the hardware is present. cat /dev/random > /dev/hda is a good way to fill your dr
Re: (Score:2)
Re: (Score:3, Insightful)
Slightly more managable? You show me one time when proc corrupted simply by "being there" in a stable kernel and I'll give that assertion to you.
Re: (Score:2)
Re: (Score:2)
The people trying to ruin Linux are the Gnome folks doing gconf, which is basically a rehashed Windows registry.
Re: (Score:2)
Except that it is based on a set of XML files rather than a binary blob database.
Re:Only thing to understand... (Score:5, Informative)
For the Ask Slashdotter:
There are a few others, but these guys are the important ones for what follows. There is also a
GCC is your compiler. You probably won't have to play around with it much, but I'll talk about some tricks to give you more insight into Linux. Suppose there's a program you want to try. You create a dummy account called "dummy" for it (so your data won't be in harm's way if it's buggy). Now, when you compile the program, you'll probably have to write
Now, suppose you end up really liking the program, and you want to be able to use it from your account, but want to deny everyone else access. You can just mv
Of course, you don't want to have to keep typing
Now you can type the program's name from any location, and it will run. But only until you restart your shell. To make the change permanent, you'll have to edit your
There are a lot of magic numbers and constructs in my post. Think of it as an invitation to learn about what you're interested in.
Re: (Score:2)
You can just mv /home/dummy/program to /home//program. Everything will (should, really) continue to work.
I doubt that they do if the program depends on its own shared libraries, i.e. shared libraries that resided in /home/dummy/program/lib. Paths to shared libraries are often (always?) hard-coded into the program binary. Thus, in such a case, just moving the program directory hierarchy would probably not work. There are of course workarounds, such as using LD_LIBRARY_PATH, but you may not want to use such a method to run all of your privately installed programs.
Re: (Score:2)
If your distro doesnt put config files there, ditch it and get one that's worth a shit.
Re: (Score:2)
Which is why, in the Windows world, people who manually edit the registry are looked upon as gods. If you can sit and stare at that all caps shit for more than 5 minutes without your eyes bleeding, you're a freaking hero in my book.
Re: (Score:2)
Re: (Score:2)
Roll your own distro? (Score:4, Informative)
Now, by no means do I recommend this for day to day use. I love Gentoo, but it breaks. Frequently. And unless you know a fair bit about how the system works, you'll end up breaking it quite often yourself. This is a good thing, and introduces you to the various configuration files, locations of critical items, how everything slots together, and how to compile your own kernel. The Gentoo documentation is excellent, and if you go about it with a certain goal in mind (web server, router, media center) you'll end up learning a fair bit about Linux in the process.
Re:Roll your own distro? (Score:5, Informative)
Honestly though, like stated above, once you understand that Linux basically treats everything like a file... you can fix pretty much anything. As far as a good reference or tips site. Google [google.com]. 99% of the time, a quick cut and paste of an error will direct you to the right place. (That is if you don't understand it right away.)
Re: (Score:2)
Aside from distro forums and Google I've found a couple of books
Re: (Score:2, Interesting)
Indispensible.
Re: (Score:2)
Re: (Score:2)
I liked Mandrake. It recognized more hardware than any other distro I'd used, and it was so easy to deal with that it was a nice gentle introduction to Linux. But after using it a while I wanted to try something else where I could learn a little bit more about
Re: (Score:3, Interesting)
My own advice to the submitter is to go between Gentoo and LFS with respect to automation and below both with respe
Re:Roll your own distro? (Score:4, Informative)
When it breaks, portage doesn't tell you why, you basically have to search the Gentoo forums for an answer. In the inevitable thread(s) related to the problem I often find a response from a dev which says that you need to update X and Y together, so both X and Y block each other. Having the package management system manage packages for you is evidently too much to ask.
I do like Gentoo's arrangement of config files etc. though. It's nice to work with, just shitty to update.
Re:Roll your own distro? (Score:4, Insightful)
If I wanted a system to be stable, but not that far behind current stuff. I'd probably be updating once a year - you have to do a bit of work to fix some of the updates, but at least you only have to do it once a year.
On the other hand, if I wanted a system that's always up to date, I'd be updating every other week. This is what I currently do on my two gentoo boxes, and I've very rarely had problems. (The last problem I had was when it upgraded mysql from 4 to 5, some of the defaults changed - I spent ages trying to work out why I couldn't connect from other machines.)
One thing to note, if you're having problems when updateing world add the --deep flag to emerge, it will update all libraries that need it as well. Then follow the emerge with a revdep-rebuild, to check for things that have been broken by updated libraries (and fix them)
Re: (Score:2)
The box was previously updated frequently precisely because falling behind causes grief, but had lain unused for four month
Re: (Score:2)
Then the Gentoo people ought to make it easy to have that happen automatically, so that I don't have to manually log in and do it all the time!
Re: (Score:2)
What would be nice is if you could pass a flag to emerge to only compile packages, not fully merge them. (You can already tell it to do fetch only)
That way, I could have an weekly script which downloaded and compiled all new packages, and then I could actually merge them when I was concentrating on what was happening (Ready to fix any issues). This would reduce the amount
Re: (Score:2)
I never said it couldn't notify me (e.g. by email), only that I shouldn't have to manually initiate it. The operating system is supposed to be "stable" (unless I was using ~, of course), so updating it shouldn't break anything.
NO! See, that's the whole point of my post: as a user, I shouldn't have to write the thing myself! Instead, the Gentoo developers should write it
Re: (Score:2)
Re: (Score:2)
No, because it would have to be more than just a cron job. What it really needs to be is a script that would run emerge, dispatch-conf, revdep-rebuild, detect if the build failed and notify the user, etc. It wouldn't be a huge piece of software, but it wouldn't be trivial.
Re: (Score:2)
Not to sound too much like an AOL weenie, but you're absolutely right.
I inherited a bunch of gentoo boxes, and I've kept every
Re: (Score:2)
It's often difficult to get things built and configured the way you want (what, I need the xml USE flag for php for this? Time to rebuild it... And I need to hand-edit an apache config file to have a h
Three letters (Score:3, Interesting)
Re: (Score:3, Funny)
Linux from Scratch (Score:4, Insightful)
Try creating a distro of your own and you should get a handle on the mysteries of the OS. If you don't have spare hardware check out virtualbox.org and try creating your lfs distro on a virtual x86 computer
Re: (Score:3, Insightful)
Avoiding Surprises (Score:2)
Break It. (Score:5, Informative)
I'm serious.
Amen (Score:3, Insightful)
Here's some things to try:
Compile mplayer. Build a firefox package for your distro. Download, patch and compile a kernel. Add a cronjob to delete some files at random. Forget about it. Try and restore them. (ext2 does not delete file pointers in inodes). Create an LVM group. Siphon disk space between disks and partition. Try a file system written by someone suspected of murder. Post on a linux-devel list and join Linus in slagging off Gnome. Try KDE and XFC
Use it. (Score:3)
Re:Use it. (Score:4, Funny)
I made the initial switch to Linux a year ago. I now feel capable enough with using Linux, from an end user's point of view, so that when things go wrong, I can fix them.
Now I know it is de rigeur not to read the article, but there wasn't even an article to read here - did you even read the question?
Re: (Score:2)
The current MO is to read just the subject line and then skip right to the comments.
Re: (Score:2)
Damnit, I've been wasting all that time reading the summary?
No wonder I don't get any first posts
No one answer. (Score:4, Insightful)
Forums are good for getting and sharing information on specific problems as long as the "google it yourself" crowd havent invaded. (how else would you have found the forum?). http://www.linuxquestions.org/ [linuxquestions.org] is a good start.
There are varias wiki's specific to certian subjects.
And I dont mean to sound rude with this, but please read the man page first. Weather or not you understand it at the time.
On a side note the best way I have found to learn about something is to break it first. but maybe thats just me.
Another great website: Librenix.com (Score:3, Interesting)
Re: (Score:2)
Install Gnome, KDE, XFCE, Fluxbox, and a bunch of other desktop related apps, upgrade your nVidia drivers, add Beryl, and really start trashing your
Wiki (Score:2, Informative)
SOme input (Score:3, Informative)
See 'man Linux Filesystem Hierarchy'. In case for some reason that doesn't work on your system, here is a link -> http://tldp.org/LDP/Linux-Filesystem-Hierarchy/ht
heres a few (Score:3, Interesting)
this is the linux doc proj the one place i found indispensable while learning slackware back in the day
lately http://www.debuntu.com/ [debuntu.com] is a god send as well
and of course , unlike windows software, most linux software readme files are actually filled with useful information
othjer than that either a quick google on a specific question or jump onto irc will usually get you some help
Re: (Score:2)
Did you mean to spam or was this perhaps a typo?
Re: (Score:3, Informative)
it should be debuntu.org
Do what I did (Score:4, Insightful)
Don't really worry too much about a specific distro. I went from RH9 to Fedora Core to Ubuntu to Debian over the span of about 4 years. Once you learn enough, you can pick up any distro without too much hassle.
My best advice is to pick a distro and dual boot with XP/Vista. Every day try to use your GNU/Linux distro a bit more each day. Be sure to try to fiddle with settings. Just make sure you have a backup ready for any important data. For awhile there, I was reinstalling the OS weekly. Don't be afraid to experiment.
Re: (Score:2)
Read a general introduction to Unix (Score:4, Informative)
There is one "classic" Unix introduction book that I can strongly recommend, and that you can probably buy used for a dollar: Exploring the Unix System [amazon.ca] by Stephen Kochan and Patrick Wood. Make sure to get the paperback edition that is about 400 pages. Also, apparently the authors are going to release an updated version of that book -- check http://www.kochan-wood.com [kochan-wood.com] for updates.
Once you learn the fundamentals of Unix systems, then you would be ready to learn the modern tools available in Linux distributions. Remember that is much more important to learn the principles and philosophy that Unix was built upon, rather than attempting to memorize arcane details.
Start with Slackware. Seriously. (Score:3, Insightful)
For example, you have to write your own iptables firewall script. But by doing this, you'll be able to understand the output of "iptables --list" on any distro out there and see what it's doing behind the scenes (for instance, amusingly, what holes does it leave open if any?).
You can download the distro here, for free:
http://www.slackware.com/ [slackware.com]
(my favorite mirror is: http://slackware.cs.utah.edu/pub/slackware/slackw
There's a good book on it available here: http://www.slackbook.org/ [slackbook.org]
Think of it this way (using a car analogy like the other guy, but more seriously):
If you learn to drive in a car with a five speed stick and a clutch, you'll be able to drive almost any wheeled vehicle on Earth with very little futzing around. It's almost like having a superpower.
But if you start out driving an automatic, you'll ONLY be able to drive automatic until somebody teaches you manual. And you won't have any reason to learn it, so you'll miss out on a potentially important skill.
It's better to start out with something challenging and switch to the easy stuff later.
Go Slackware, be a nerd like us! You'll thank me later.
Re:Start with Slackware ... I did! (Score:2)
>>> "... you have to write your own iptables firewall script."
This simply isn't true. And in my poll (http://www.linuxquestions.org/questions/showthrea d.php?t=530208&highlight=firewall [linuxquestions.org]) of just over 100 slackers (not statistically significant but hey) there were slightly more using script generators than writing their own scripts.
I like firestarter (http://www.fs-security.com/ [fs-security.com]) and it seems others do too.
FWIW.
Oh and re the car analogy - having driven a stick shif
Re: (Score:2)
Oh and I'd probably have written the script too if I could understand it all without having to read the flippin' man pages.
Old school, learn Unix (Score:3, Informative)
When I was learning about Linux, back in the mid-90s, the most valuable resource I found was The Internals of the 4.3BSD Operating System by McKusick, Quarterman, Leffler and Karels. This book acquainted me with the design goals of unix-like operating systems, and the issues of implementing these patterns.
Also, I'd pick either Aileen Frisch's Essential System Administration or UNIX System Administration Handbook by Evi Nemeth.
Fast forward to the 21st century, I now spend the bulk of my time using FreeBSD.
Linux is great, but remember that the thing that makes it great is that it's a unix-like OS. Learning the skills to be comfortable on Linux, Solaris, *BSD, HP-UX, AIX, or whatever the flavor of the day, will take you further than limiting yourself to just one.
Good luck!
One possibility (Score:2)
The project is also run by some really awesome people...probably the most decent that I've come across in the Linux community.
Linux links (Score:2)
Just read this (Score:3, Interesting)
There are probably some good books out there, and I hope you get some recommendations for them, but there is one key thing that you should learn about Linux that will get you 99% of everything you'll ever need to know about how your system works: How it boots.
If you understand how everything gets started you'll understand how it all fits together, and, even better, you'll have the starting point you need for tracking down anything else you need to figure out. And the great thing is that it's simple enough to described reasonably completely in one brief slashdot post.
The boot process consists of the following steps:
That's it. All you have to do is go read that shell script and you'll find out how absolutely everything running on your system gets started, from the file systems that are mounted to the network devices that are configured to the graphical user interface. Of course, along the way, you'll run across dozens of commands and hundreds of configuration files that you'll have to look up, but with 'man' and a little persistence you will gain an understanding of each major component, where it lives, what it does, how it gets started, restarted, killed and modified.
Even better, you don't have to worry about understanding it all at once. Once you find the /etc/init.d/rc script, and see how it executes all of the other scripts in /etc/init.d, you'll be well equipped to track down the answer to any question you have about how your system works. Sometimes getting an answer will mean traipsing through a few levels of indirection, but all the information is there. No magic, nothing hidden, all there for your perusal and/or modification.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
But Ubuntu still uses init, and inittab, and /etc/init.d/rc to launch upstart, so the same starting point applies, and you can still follow the threads in the same way, it's just that they follow a different route.
Re: (Score:2)
Re: (Score:2)
None of which will eliminate init, or inittab, or the script that launches upstart. Take a look at how OS X launches launchd.
Re: (Score:2)
Correcting myself (Score:2)
I have to correct myself. upstart does indeed replace init. That doesn't invalidate my suggestion, though, it just changes it. On Ubuntu the thing to do is to dig through your upstart configuration file and the scripts that it runs. There's still no magic, and you can still use it as the starting point to understand how everything on your system fits together.
Re: (Score:2)
Use the source luke, use the source ! (Score:2, Informative)
On linux, most of the configuration is done in _text_ files, and most of the system set-up is done by sh/bash shell script. Get familiar with shell scripting (it's a minimal requirem
In my opinion the best way... (Score:2, Informative)
Books (Score:4, Insightful)
Essential System Administration By Æleen Frisch
http://www.oreilly.com/catalog/esa3/index.html [oreilly.com]
Unix Power Tools By Shelley Powers, Jerry Peek, Tim O'Reilly, Mike
Loukides
http://www.oreilly.com/catalog/upt3/index.html [oreilly.com]
Running Linux By Matthias Kalle Dalheimer, Matt Welsh
http://www.oreilly.com/catalog/runlinux5/index.ht
The UNIX Systems Administration Handbook by Evi Nemeth, Garth Snyder,
Scott Seebass, Trent R. Hein, et al.
http://www.amazon.com/UNIX-System-Administration-
The Practice of System and Network Administration by Thomas A.
Limoncelli, Christine Hogan
http://www.amazon.com/Practice-System-Network-Adm
Martin F. Krafft: The Debian System: Concepts and Techniques
http://debiansystem.info/ [debiansystem.info]
Benjamin Mako Hill, Jono Bacon, Corey Burger, Jonathan Jesse, Ivan
Krstic: The Official Ubuntu Book
http://www.amazon.com/Official-Ubuntu-Book-Benjam
Why not do the most obvious thing? (Score:5, Informative)
1. What I learned from my local LUG
2. What I learned from my best friend, the Linux Guru
3. What I learned from reading a multitude of books and websites
4. Through classwork at the local business college with a Linux-friendly IT program
Interact with people who know about Linux. Ask questions. Read HOWTOs. Get reference books and read them.
Re: (Score:2)
Tools are the key (Score:5, Informative)
First things first is the terminal (xterm, kterm whichever it doesn't matter) use it. Forget the GUIs, use the shell.
That brings us onto the shell itself. Pick one and stick with it for a while. On linux most people prefer bash, its a good choice as even though its not on all unixes by default its not difficult to obtain (just don't try to set the root users default shell to bash on solaris)
Learn the language of the shell, pipes, redirects, command line interpretation of special characters, handy tricks like tab complete, loops, variables, tests and use these all on one liners - progress to script files and also learn about functions - shell scripts are usually going to be fairly primitive tasks but they are the key to an easy life as an admin.
Man is your friend - and should always be the first place you turn for help, then google, then forums.
Learn the basic commands, ls, mv, cp, rm, learn their options and understand the justifications for using them (-i? -f?)
Pick an editor and learn to drive it - this is a long process but well worth it. Don't bother with a GUI one, consider that later. On a default linux install you will probably have vim and emacs - try them both, see which you like and use it. Check out guides on how to customise them until they behave just how you want them (I have a 10 line
learn atleast the basics of the other important tools - at the very least find and grep. Awk and sed should certainly be on the list as you will encounter many scripts that use them, atleast some basic knowlege of perl would be handy (I prefer to use perl instead of awk and sed but thats my preference not everyone would agree)
Set up services and experiment, run a webserver, database server, mail server and learn as much as you can stand to about iptables to secure your box.
Keep backups, don't be afraid to break things, fixing what you broke (after finding out what you did to break it) is some of the best education yuo can have
All in all
Have fun!!
Re: (Score:2)
In addition to the previously noted CLI tools, spend some time learning how to use the "find" command. The -exec option of the "find" command is a powerful way to perform a task on a lar
Re: (Score:2)
Also never under estimate the usefulness of screen -x
(if you never tried it then do so, open up 2 xterms, start screen normall in on, and run screen -x in the other, 2 xterms, 1 set of shared screen sessions)
"How Linux Works" No Starch Press (Score:2, Informative)
linuxfromscratch.org (Score:2)
have you tried ... (Score:2)
Anyhow, have you tried installing something like dvd::rip (or a LAMP environment or KDE) from scratch - ie download the source code, configure-make-and-compile and fix any problems along the way.
You can consider with dvd::rip you've been successful when you rip a section of dvd with sub-titles and burn it to a CD that runs in your dvd player (or eg for LAMP, you're serving a DB driven site, like a CMS, from your own box).
IIRC dvd::rip gave me p
Just keep using it (Score:2)
What I did to learn... (Score:2)
Simple tips (Score:2)
In the bootmanager if you add s to the list of parameters this is like your Windows safe mode (Single user mode).
Running dmesg will show you what was happening at bootup.
Re:What distro? (Score:4, Insightful)
Sure thing.
Get yourself a Haynes manual [haynes.com] for your model vehicle.
Re: (Score:3, Insightful)
Re: (Score:2, Funny)
Re: (Score:2)
Re: (Score:2)
for dirs in /
for prefix in '' 's' ; do
cd ${dirs}${prefix}bin
for binary in * ; do
man $binary
done;done;done
You shouldn't need to su to root to see in the various sbin dirs, only to run the apps. for example, on my system (debian etch)
One of the "best practice" ideas for any unix-like OS is spend as little time as root as possible.
Re: (Score:3, Informative)
Scott Graneman Linux Phrasebook
-- this isa fairly small but amazingly comprehensive and very clear book on using the command line. The OReilly Pocket Linux is also good but much more limited.
Ward How Linux Works
-- fairly discursive, but once you've read it, you understand how it all works and the detail will slot into place
Schroder Linux Cookbook (or actually, anything she writes)
-- well, she's brilliant, doesn't cover everything
That right there is your issue. (Score:2)
Installing apps on Linux is a process that goes something like this:
Prep:
0) Find out how your linux distro of choice installs software. (Is
Re:Where is the fucking windows 2 linux translator (Score:2)
Ubuntu example: