Linux Basics

From JimboWiki
Revision as of 19:50, 18 January 2007 by J (Talk | contribs)

Jump to: navigation, search


This page is incomplete
More work needs to be done on this page, so if somthing is missing, don't be surprised

This is the first part of the jimbodude.net Linux tutorial. It is meant to introduce Linux people who have a reasonable amount of technical experience but not enough time to spend reading books or doing reasearch on their own. At the end of this document, you should understand what Linux is, how users and files are organized, how to navigate the filesystem, and how to manipulate files. I will not discuss how to install Linux, as that is different for each version of each distribution. See the documentation for the version you plan on using.

What is Linux?

"Linux" generally refers to any operating system using the Linux Kernel. The Linux Kernel is available under the "GNU General Public License" which makes it free for most uses and allows it to be distributed as open source. Linux was developed by Linus Torvalds in 1991. For more information about Linux and its history see Wikipedia:Linux kernel and Wikipedia:Linux.

Simple Overview

Linux was originally developed to be a desktop operating system for "hard core" users. It has since evolved and become available as a server operating system and has emerged into many corporations. Linux provides a huge amount of flexibility for developers because it supports many programming languages and is available on many platforms other than computers. The main goal of the project was to provide a free Unix-like operating system to the masses.

Technical Overview

Linux is a Monolithic kernel. By design, everything running on a Linux system is very modular. For instance, systems do not need to have a GUI. Systems that do generally use some flavor of the X Server. The X Server is controlled separately from the kernel, and any issues with X will not affect the kernel. Also, the X server allows many different displays to run simultaneously. So different users logged in concurrently can have a completely different GUI presented. This is true of many other aspects of Linux software including printing and sound.

The Linux kernel has been ported to many common devices including routers (see DD-WRT for Linksys WRT routers), MP3 players (such as the Apple iPod), phones, and gaming systems (such as Sony PS2, Nintendo GameCube, Microsoft XBox, and XBox 360). Many embedded systems (such as TiVo and older Linksys routers) also use Linux based systems out of the box.

Distributions

The term "Linux" technically only refers to the operating system kernel, but the kernel alone is relatively useless. So people put together more complete software packages which include applications and supporting software. These packages are called distributions. There are so many distributions of Linux available it isn't even funny, and each has its own benefits and disadvantages. I will only cover a few of the major ones here breifly.

Slackware

Slackware (http://www.slackware.com/) is one of the earliest distributions. It was released in 1993. It is meant to contain only the most stable open source programs available and be as simple as possible. By simple, I do not mean simple to operate. The developers leave out many features that could hinder performance or create configuration problems. Software is organized in packages, but there is a pretty serious lack of package management tools. For instance, there is no way to determine if all an application's dependancies are installed. Packages are stored in simple tarballs, which is consistent with the minimalist attitude of Slackware. Technical people don't seem to think this is an issue, but the average user should beware.

Red Hat and Red Hat Enterprise

Probably one of the most famous distributions is Red Hat (http://www.redhat.com/). Red Hat 1.0 was released near the end of 1994. It has always been targeted at the server market. It includes a built in installer called Anaconda and the ability to script installation using kickstart. Software is organized in RPM packages which allow for easy program installation and dependency checking. Red Hat Linux used to be available for free, the company made its money by selling service contracts and gauranteed uptime. Around 2003, Red Hat renamed its product from Red Hat Linux to Red Hat Enterprise and stopped distributing it for free.

Fedora Core

Fedora Core (http://www.fedoralinux.org/) is a project sponsored by Red Hat and based on Red Hat Linux. The idea is Fedora Core will be a completly open-source, general purpose operating system for home and recreational use, and Red Hat Enterprise is stable enough to be sold for profit to corporations. Everything in Fedora Core is pretty much the same as Red Hat, except more "cutting edge" technologies are available, and it is slightly less stable. This is the distribution I most commonly use.

Yellow Dog

Yellow Dog (http://www.yellowdoglinux.com) originonlly used Red Hat as a starting point, and now bases itself on Fedora Core. It was released in 1999 for PowerPC architecture and currently supports Macs, some IBM servers, and partially Sony Play Station 3. However, some apple hardware (such as AirPort cards) do not generally function properly without kernel modification. As a Red Hat/Fedora spin-off, Yellow Dog uses RPM package management. Yellow Dog costs between $30 and $90 depending on which package is chosen.

Debian

Debian Linux (http://debian.org) is most known for their update method, called apt, and its strict policies on package quality and dependency structure. It was origionally released in late 1993.

Ubutu

Based on Debian

SUSE

Knoppix

Based on Debian

Why Linux?

Technical

Cost and Availability

Development

Security

Compared to Microsoft Windows

Compared to Other UNIX Based OSs

Using Linux

If you're just looking at a Linux GUI, things don't appear much different from Microsoft Windows, but under the hood there's a whole different story.

How to Connect to a Linux Machine

Shell and SSH

X Server (locally)

X Server (remotely)

VNC Server

Understanding the Linux Filesystem

If you are used to other non *nix operating systems, the first difference you will probably notice is the file system. The base of the file system exists at "/" (pronounced "root directory"), not "My Computer" or "C:\". because of this, there is no notion of what physical drive you are working from. You will see why this is an advantage in a later tutorial. There are several important directories in "/" that you might want to know about.

/home/

/root/

/etc/

/usr/

/dev/

/opt/

Understanding Users

Normal Users

System Users

"root" User

Properties of Users

Important Commands

Navigating the Filesystem

Manipulating Files

Text Editors

Emacs
vim
Graphical Editors

About Commands

Where they live, how they execute, how to execute commands in the current directory, etc.

Conclusion

See Also