View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Newbie Shakedown Guide - What's Linux?

From LQWiki

Jump to: navigation, search

Contents

Newbie Shakedown Guide - What's Linux?

originaly posted on the LQ forums by sundialsvcs

The Linux Kernel

This what Linus Torvalds started writing. It typically resides in the /boot directory and gets loaded into memory when you turn on the computer, by means of a boot loader such as GRUB or LILO. Once loaded, it always remains in memory (although it also contains "kernel modules" that can be loaded or removed, which is another story). The Kernel is what IBM likes to call a System Control Program, and that is exactly what it does: it controls the system (hardware), and not much more. It parcels out memory, schedules CPU time, controls hardware devices, and deals with the "interrupts" they produce. All very low-level stuff. The term device driver refers to a part of the kernel (usually a kernel module) that is responsible for recognizing and controlling a particular type of device.

System Libraries (e.g. glibc)

Most programs do not make direct calls to the kernel. Instead, they work with libraries, which are found in various places, but most notably /lib and /usr/lib. Like Windows .DLL files, they are usually shared by many applications at once. Unlike Windows, there's a well-defined system by which many different versions of the same library can be installed at once. Well-behaved programs request the "latest" version but some applications require specific ones. The system command ldconfig is important here.

Daemons (services)

This fanciful name refers to a program that is (usually) started when the system is booted, remains up all the time, and provides services to other programs. In other words, it is a program that runs in the background. Everything from printing to file-sharing to the act of logging on is handled by them. When the system starts up, one process (process id 1) named init is started, and it starts all the other ones as directed by the file /etc/inittab. Different arrangements of daemons can be requested by the mechanism of runlevels. (Depending on the init style of you distribution, the actual process differs. See init.

X-windows (X11)

Unlike Microsoft Windows, Linux uses a de-centralized, client-server arrangement for handling graphics. An interesting feature of this system is that you can graphically log-on to a machine that has no graphics card of its own, through the network. Found in /etc/x11, it is an unexpectedly complex but sophisticated subsystem. (XDMCP)

Window managers; desktop (e.g. Fluxbox, KDE, Gnome)

With Microsoft Windows, your graphical user interface (GUI) only looks and feels one way. With Linux you have a broad choice. The X-windows system mentioned previously relies upon window managers to control the arrangement of windows on the screen and desktops such as Fluxbox and AfterStep to specify how things look. Some like KDE, Gnome, XFce and Enlightenment offer a larger solution, a full desktop environment. The choice is yours.

The Shell (e.g. csh, sh, bash)

You can log-in to Linux using a command-line. You can open a "terminal" window (vdt) and issue commands. The program that accepts and processes these commands is called a shell, basing on the idea of it as a wrapper around the system, enabling interfacing with it.

Commands, Paths

Most of the commands recognized by a shell aren't built-in to the shell; they're programs. They're usually found in /bin, /usr/bin, and /usr/local/bin. Superuser binaries are usually kept under /sbin and /usr/sbin. The command echo $PATH will tell you where the shell knows to look. Command files can also be located in the current directory, but the shell won't automatically look for them there. Commands found in the current directory must be prefixed by ./ (period slash, period as being the current directory, ./ is just a path to a binary). The most widely encountered example is the configure stage of a source compile.

conclusion

To be sure, a system like this that is loosely-connected, unlike Windows, does take time to "get to know." I hope that this high-level road map might help a little in figuring out just where a particular problem you're having might lie. And instead of calling yourself a newbie and feeling somehow embarrassed by it ... you'll start to see that, when you are having problems, there's a good reason for it! (And I assure you, it happens to us all.)

See also


Personal tools