Introduction to Linux

March, 2010

Table of Contents




Objectives

Our objectives are:
  1. To explain the differences between working with Linux and working with other operating systems.
  2. To help you understand the basics of using Linux so that you can:

Return to top of page




What is Linux?

Linux is an operating system that evolved from a kernel created by Linux Torvalds. A kernel is the nucleus of the operating system. It tells the processor what you want it to do. A kernel is pretty much useless without other programs to interface with parts of your computer and you.

Originally Linux was not for everyone. You accessed it from a command line interface (CLI) like MS DOS but to get Linux working you had to spend a lot of time learning how to install all the programs.


High points:

Return to top of page




Brief Introduction to Linux

Command-Line Interface

The *nix Shell

The shell is your workspace in the terminal. It is a command language interpreter that executes commands read from the standard input device or from a file.

Shell Name    Developed by Where Remark
BSH (Bourne-Again SHell) Brian Fox and Chet Ramey Free Software Foundation Most common shell in Linux
CSH (C SHell) Bill Joy University of California (For BSD) The C shell'ssyntax and usage are very similar to the C programming language.
KSH (Korn SHell) David Korn AT & T Bell Labs
TCHS See the man page. Type $ Man tcsh
--
TCSH is an enhanced but completely compatible version of the Berkeley UNIX C shell (CSH).
  • The 't' in tcsh comes from the T in TENEX, an operating system which inspired Ken Greer, the author of tcsh, with its command-completion feature.

To find available shells in your system type:
cat /etc/shells

Cat types out the contents of a file as you saw above. The file "shells" in the "/ etc" directory holds all available shells in the system.

To find your current shell type:
echo $SHELL

The command "echo" echos or types what follows it. The "$" sign says echo the cont ents of the following system variable. The "SHELL" is a system variable set up in your init file or by using the "export" command.

To find out where your shell and other basic information is stored:

To get back to your home directory type:
cd
Now, to list all files including the hidden ones type:
ls -al

Here is what it will look like on "Tezpur":







Return to top of page




Environment Variables

What are they?

The shell's environment is that umbrella of persistent knowledge under which the shell operates. This information is stored as "environmental variables", which are global variables that may be used at any point by the shell -- either internally or when explicitly required by the user. Other variables can be customized by the user using a specific set of files contained in their HOME directory. (Thanks to Brett Estrade for this paragraph.)

Why should I know about them

Being able to know which environment variables affect which aspect of your environment means that you are able to customize your environment. In many shell scripts and using many applications or programming languages you will need to know the values of these variables.

Your global environment consists of environment varibles such as:

Return to top of page




Linux Architecture

Return to top of page




Kernel

Return to top of page




Filesystem Information

Return to top of page




Users and Groups

In Linux a user is identified by their username. Linux usernames are similar to Windows logon IDs. Linux maintains a list of users, called a name space, either locally on each individual machine or across the network via NIS for a group of machines.

User == uid

Each user on a Linux machine has a unique username that corresponds to a unique uid. The uid is a numeric value used to determine if the user is authorized to perform a particular task. It is important to note that the Linux operating system is concerned only with the numeric value of the uid and not the text that describes the user's name.

Group == gid

Groups are also associated with unique numbers called gids. Users may belong to more than one group, although they can be associated with only one group at a time. Groups may have zero, one, or more members. Like uids, the Linux operating system is concerned only with the numeric value of the gid and not the textual name of the group.

Authentication

Each time a user tries to login, Linux attempts to authenticate that user against a name space. The login process prompts for a username and, usually, a password. Linux then encrypts the entered password and checks to see if the encrypted text matches the stored version of the user's encrypted password. If there is a match, the user is authenticated; if not, the user is denied access.

/etc/passwd

Linux keeps a table of information about each user in the file /etc/password. Each line of this file represents a different user and has seven different fields:

  1. username
  2. encrypted password
  3. uid
  4. gid
  5. identification
  6. path to home directory
  7. initial program

In the Terminal window, type cat /etc/passwd

Permissions

Since Linux treats everything as a file, learning about file permisions is very important. Linux allows access to a file based upon affiliation as defined by user, group, and other. The possible permissions for each affiliation are read (r), write (w), and execute (x). Linux actually uses one bit to indicate these three permissions for each of the three affiliations.

In the Terminal window, type ls -l /etc/passwd

Your output should look similar to this:

The first dash is a flag specifying the type of file. The next three characters are the permissions for the user who owns the file. The next three characters are the permissions for the group associated with the file. The final three characters are the permissions for any user who is not the owner of the file nor belongs to the group associated with the file.

Each of the permissions has a different meaning depending on whether it is set for a file or a directory:

Return to top of page




More about Shells

Again, the shell is your workspace in the terminal. It is a command language interpreter that executes commands read from the standard input device or from a file. You want to be as comfortable as possible in your shell so you may want to change your environment or write short scripts that will take basic commands you do all the time and group then together so you can execute them with just one command.

Here is a place for a warning: Do NOT change environment variables unless you understand completely what you are doing.

Suppose I setup my machine and didn't install JAVA because I'm a C and Fortran person. Now I need to install JAVA. Once it is done I need to make sure I can get to it.

Before we start changing things we have to know which shell "family" we are in. There are two major families of shell:

To create or modify a global environment you must use either "export" in the bash shells or "setenv" in the csh environment.

Bourne shell: To add a new place to look in your PATH variable:

export PATH=/admin/bin:PATH

C-shell:

setenv PATH "/admin/bin:PATH

The difference here is only the syntax of the command due to the differing shells.

When you login the system default environment is set using system default files. For the Bourne shell family this would be: /etc/profile . For the C-shell family it is the /etc/csh.cshrc . These files automatically set up the default path and vital user system variables.

Bash users may create the following files in their home directory:

Remember:
~/.bash_profile must not produce any standard out, since it will break tools such as rsync.


Return to top of page




Beginning Shell Scripting

You use some text editor to write your shell scripts. After writing your scripts you n eed to change the permissions so the execute permission is on for the user:

chmod u+x myscript

. You will then need to execute your script: ./myscript

> The "hello world" program in bash shell script:

vi kathy1
#
#
#This is my first shell script! # clear echo "Hello World - this is my first shell script!" #

Now, execute the script

./kathy1

This script doesn't execute because we didn't change the permissions. So change those.
Now execute the script as above.

Lets create another script:

vi ginfo
#
#
# Script to print user information who currently login , current date & time
#
clear
echo "Hello $USER"
echo "Today is \c ";date
echo "Number of user login : \c" ; who | wc -l
echo "Calendar"
cal
exit 0

vi ginfo
#
#
# Script to print user information who currently login , current date & time
#
clear
echo "Hello $USER"
echo "Today is \c ";date
echo "Number of user login : \c" ; who | wc -l
echo "Calendar"
cal
exit 0

Now, set the permissions as before, then execute the script just like before.

For those of us that don't use *nix languages all the time ideas for scripts are few and far betweens but system administrators write them on a daily basis. They also use the commands from the command line daily.

A good starting guide is: Vivek G. Gite's Shell Scripting Tutorial

Return to top of page




  • Viewing Files

    One of the things that are very important is to see some of the information in a given file. The commands are:
    • cat - shows you the contents of an entire file (you will see only the last screen full of lines)
      • the command is cat filename
      • cat test.txt

    • more - shows you the contents of an entire file one screen at a time
      • the command is more filename
      • more test.txt

      • to go to the next screen hit the space bar
      • to see only the next line hit the Return key
      • to quit more hit the "q" key
    • head - shows you the first 10 lines of a file
      • the command is head filename
      • head text.txt

      • to see fewer or more lines us the -n option
        • head -3 test.txt

      • tail - shows you the last 10 lines of a file
        • tail test.txt

        • tail -3 test.txt

        • shows the last 3 lines of file test.txt



      Return to top of page




    • Wild Cards to Use with Commands

      Wild cards can be used with certain commands to create patterns for filenames. The wildcards allow you to create many types of filenames. Some commands that wildcards can be used with are:
      • ls
      • cp
      • mv
      • rm

      The wildcards are:
      • ? - allows the character in this location to be replaced with any other character in the ASCII character set.
      • ls t?st.txt

      • lists all files that start with "t" and end with "st.txt" and have the second letter any character.
      • so test.txt, tist.txt, t?st.txt, t9st.txt, tmst.txt would all be shown.
      • ls ?

      • lists all files that have names with only one character
      • so a, b, 3, _, z, 9 would all be shown
      • * - replaces any number of characters.
      • ls p*

      • lists every file that starts with "p" in the directory
      • ls t*t

      • lists every file that starts and ends with "t" no matter how many other letters or characters are in it
      • [] = replaces any single character inside the brackets
      • ls t[aeo]st.txt

      • lists every file that starts with a "t", has either an "a", "e", or "o" as the second character and ends with "st.txt"
      • you can also specify a range of characters in the brackets, i.e.:
        • [a-z] any file that has any of the lower case characters from a to z inclusive
        • [!-+] any file that has any of the special characters: "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "+"
      • ls t[a-z]st.txt




      Return to top of page




      Creating Files

      Before learning how to create files we need to know the filename conventions. Since everything in UNIX like operating systems are files these conventions apply to directory names, stream names, process names, etc.

      Conventions:

      • Avoid characters that have special meaning to the operating system such as '/', '*', '&', '%', ','.
      • Generally use only alphanumeric characters (a-z, and 0-9) and the underscore, '_', and dot, '.'.
      • By convention we will start a file with a lower-case letter, some combination of alphanumeric characters, underscores and a dot followed by one to more alphanumeric characters.
      • For example:
        • prog1.c
        • prog1.c.bak
        • kathy.txt
        • plan.cct
      • Some applications give the same name to every file they generate so you will have to rename them before running the application again.

      There are several ways to create files in UNIX like OSes. We will look at:

      • touch - creates empty files (size is zero)
        • ls -l

        • lists all file in current directory
        • touch file-1 file-2 file-3 glossary

        • ls -l

        • Also allows you to change the last access and modify the time of a file.
      • copy - copies a file already in existence to a new file (you have two copies with different names)
        • cp file-1 file-1a

        • creates an exact duplicate of file-1 (the empty file we just created) named file-1s
      • text editors - vi, emacs, notepad, etc
        • There are many text editors out there. They work liked a very stripped down word processor by allowing you to create files. Since it is a text editor you can't do all the neat things a word processor allows you to do, however, you can create combinations of the printable ASCII character set.
        • vi filename

        • the above command creates a file "filename" IF it doesn't exist already. If it does exist then it pulls it up to be edited.
        • We will pursue vi shortly.
      • command output - the output a command generates is stored in a text file
        • ls -l > list-files

        • a.out > prog1.output




      Return to top of page




    • Download file to work on in Vi

      • In your LONI account type the following:
        • wget http://krt3.lsu.edu/ktraxler/training/linux/waldn10.zip

        • In your Terminal type: unzip waldn10.zip

        • Now you are ready to make changes to this file.



      Return to top of page




    • Learning Vi

      Vi is a text editor. It comes on every UNIX like system in the base install. There are many other text editors and different people believe different ones are the best. I am going through vi here because you can always find it on a UNIX like OS unless the system administrator has removed it (Not likely).

      Vi stands for visual editor.

      • To create a file, choose a name that doesn't exist in the directory
      • vi newfile This creates the new file and puts you in command mode, one of vi's two modes.

      Vi has two modes:
      • command mode - allows you to use the normal keys to give movement and text editing commands
        • move up or down one character, one line or one page
        • substitute one pattern for another
        • ...
      • text mode - allows you to use the normal keys to type the characters needed for your file.

      Command mode:
      This is the mode that vi comes up in. If the file doesn't exist then you will see a screen with tilde's "~". If the file does exist you will see the first page of text in the file. Lets create a new file - use your name followed by .txt. So my file would be named "kathy.txt".

      vi kathy.txt

      Vi basic movement commands. You must be in command mode to move around to get into command mode press the escape key . Once you are in command mode you will use the h, j, k, and l keys to move around.

      • H - moves you to the first character of the "highest" line on the screen
      • M - moves you to the first character at the "middle" of the screen
      • L - moves you to the first character at the "bottom" of the screen
      • h - moves you to the left on the current line
      • j - moves you down to the next line in the file
      • k - moves you up to the next line in the file
      • l - moves you to the right on the current line
      • $ - moves you to the end of the current line
      • ^ - moves you to the beginning of the current line
      • Control key plus "f" moves you one page toward the beginning of the file
      • Control key plus "b" move you one page toward the end of the file
      • type the colon key, ':', followed by a line number to go to that line

      Because this is a new file there is nowhere inside of the file to go. So the cursor can't move around. We have to go to text mode and create text so that we have something to move around in.
      Use the following commands to add text to a file:

      Vi Text mode:
      Vi basic insert text commands:

      • i - insert new text to the left of the character the cursor is on
      • I - insert new text to the left of the first non-blank character on the line
      • a - insert new text to the right of the character the cursor is on
      • A - insert new text to the right of the last character on the line
      • o - inserts a new line below the line the cursor is on
      • O - inserts a new line above the line the cursor is on

      Now that we know the basic commands lets finish adding text to this file:

      • Copy the text off the web page
        hit the 'i' key for insert mode
        Paste the text into the file
        hit the escape key Type :wq

      • ":wq" - the ":" tells vi that a command is coming up next
        the "w" tells vi to write the file to disk (save the file)
        the "q" tells vi to quit
        If you don't type the "q" vi saves the file and lets you continue

      • Now that you have text to move around in practice using the movement commands
      • Go into the file, and insert a word on the first line after the third word

      • Save the file

      • Get into text mode and go to the third line. Insert a new line after the third line and type "All good boys do fine."

      • Get into command mode, to to the 8th character on the first line and replace it with a "+". To replace it put the cursor on the 8th character, type a lower case "r" then type the plus sign.

      • Save and exit the file

      • Open the file "waldn10.txt"

      • Add five lines to the file

      • change all of the a's to o's in lines 10 through 30

      • save and exit the file

      • view at least one page of the file.




      Return to top of page




      Getting Help from the System

      The basic way to get help on the system:
      • Man pages are the way that you check out the syntax of a command in UNIX like operating systems. There are on-line manuals which give you information on the commands: syntax, options, etc. To access these pages for a command you would type "man command-name". Man pages are presented using the "more" option for file viewing.
      • Type:
        man cp

      • This gives the information on the cp (copy) command.
      • whatis command-name
      • The command, whatis, gives a one-line description of the command but doesn't include the options.
      • Type:
        whatis cp

      • apropos keyword
      • Gives the command with this keyword in their description in a "cat" file viewing style.
      • Typed:
        apropos copy




      Return to top of page




      File System Access/Security

      When you execute the command "ls -l" (list the contents of the directory in long form) you will see something that looks like this:
      [ktraxler@is linux_II]$ ls -l
      total 80
      -rwxr-xr-x 1 ktraxler internalusers 48928 Jan 28 2005 linux.html
      -rwxr-xr-x 1 ktraxler internalusers 15650 Aug 2 10:58 linuxII.html
      -rwxr-xr-x 1 ktraxler internalusers 15795 Aug 2 09:54 linuxII.html.bak

      The group of characters to the left are the access rights or permissions of each file, directory or link. The first character tells whether this is a file, directory or link. The values would be:
      • '-' means a file
      • 'd' means a directory
      • 'l' means a symbolic link (like an alias or shortcut)
      The remaining symbols have context in groups of three giving the permissions of access for different groups. These permissions allow the reading, writing and execution (or pass through) for a person or group.
      • The first group of three are the permissions the owner of the file (account) has.
      • The middle three are the permissions for the group that file belongs to.
      • The last three give the permissions for anyone not the owner, or in the group (everyone else on the machine.

      In each group of three you will have the following permissions:
      • The first character in the group gives the read permission and can be either a 'r' or a '-'. This indicates whether or not you have permission to read the file or access the directory.
      • The second character in the group gives the write permission and can be either 'w' or '-'. This indicates whether or not you have permission to write to the file or add or remove files from the directory.
      • The third character gives the execution permission, if it is appropriate, and will be either 'x' or '-'. If this is an executable (from a program or application) you can actually run it, if it is a directory you can pass through to access the contents.
      To read a file you must have read access on the file itself and you must have executable access to the directory it is in (so you can get into it) and to any directories that are ancestors of this directory (come before).

      Examples of permissions:

      -rwx------  
      a file that only the owner can access. The owner can read, write or execute the file.
      -rwxr--r-- a file that everyone can read using vi, more, cat, etc. But only the
      owner can change the contents or delete it.
      drwxr-x--- a file that the owner and the owner's group can access. The
      owner can read, write or execute but the group can only read and execute.
      To see this on your account type:

      ls -l




      Return to top of page




      Changing File Access

      You have to be very careful with this type of action, if you change permissions on the wrong files you can change the operation of your computer! Only the owner of a file or directory can use the command to change the file access. The command to change this is "chmod", changing mode. The syntax of the command is:
      chmod ugoa+[-]rwx file-name.
      The plus adds a permission for an either the owner, group, or other. The minus removes that permission.

      First type:

      ls -l


      Now, look at the permissions on the file your-name.txt. Then type:

      chmod a-w your-name.txt; ls -l


      (The semi-colon allows you to type multiple commands on one line. The commands are then executed in the order typed.)

      You have just changed the access on file your-name.txt so that the owner, the group and others may write to that file, if they have permission to get into the directory that contains it.

      Now, lets change the permissions so that the group has no access and other has all access modes. First type:

      ls -l


      Then type:

      chmod g-rwx kathy.txt; ls -l


      This changes the permissions for the file, "your-name.txt" so that the group has no permissions. Now you need to change the permissions so that all other users has every access permission:

      chmod o+rwx kathy.txt
      ls -l

      .
      There is another way to set permissions and that is by adding the numeric values assigned to the permissions for each group. I am told this is the way a REAL UNIX/Linux user changes permissions! The permissions have the values of:
      • Read == 4
      • Write == 2
      • Execute == 1
      So, for example the file permissions used in the examples above become:
      -rwx------  
      700
      -rwxr--r-- 744
      drwxr-x--- 750

      So to change a file or directory's permissions so that it looked like the first one:

      chmod 700 filename


      To change a file so ther permission looks like the second one:
      chmod 744 filename


      Your home directy is the place on the Unix/Linux server that you log into and your information is stored. This is represented by a tilde, "~". You can run the chmod command on your home directoy. The safest setting is: chmod 700 ~.

      ange a file so ther permission looks like the second one:

      chmod 744 filename


      Your home directy is the place on the Unix/Linux server that you log into and your information is stored. This is represented by a tilde, "~". You can run the chmod command on your home directoy. The safest setting is: chmod 700 ~.

      However, if you do this you can't serve any web pages that you have created because the web server doesn't have access to move through the directories to get to "public_html". The recommanded setting for your home directory, from many tutorials and textbooks, is:
      chmod 711 ~. This will allow the user full access and all others can pass through the home directory.



      Return to top of page




      Grep

      The grep command is usefule for finding strings of characters in text files. It is short for "Get Regular Expression and Print". To find all users using the bash shell on this machine:

      grep bash$ /etc/passwd

      The "$" sign is used to find lines ending with the characters "bash". You have to know the format of the file you want but with the /etc/passwd file the line ends with the shell.

      ps uax | grep $USER

      This command says:
      "ps" gives information about a selection of the active processes. By default it selects all process with the same effective user ID as the current user. Adding the options "uax" is a BSD syntax for viewing every process on the system with the resources you are using. Then you pipe it through grep "| grep" with for strings that match the regular expression defined by $USER (me in this case).

      M

      find . -name "*.xml"

      Now try it so we can see some specific subset of files:

      find . -name "*.xml" | grep $USER




      Return to top of page




      Awk

      Awk is another text processing tool that will make your hunt for data a lot easier. It is actually a programming language designed for text manipulation but is widely used as an on the spot fool for administration.
      Take the example on process from grep:

      ps uax | grep $USER

      now try:

      ps uax | awk '/ktraxler/'

      This is just another way to write this command and get the same information.

      ps aux | awk '/ktraxler/' {print $1, $2, $4}'

      The above command prints the first, second and fourth column of the table created by "ps aux".

      awk can do math also:

      ps uax | awk '/ktraxler/ {x += $4} END {print "total memory: " x } '

      This command gives the total memory for all of the processes for user "ktraxler".


      Return to top of page




      Other Useful Commands

      Some of the other commands that you might find useful are:
      quota shows you your quotas on the machine in column format with headers
      usage: quota -v
      dr reports the space left on the file system
      usage: dr
      du
      usage: du
      gzip Compresses a file
      usage: gzip filename
      gunzip Uncompress a file
      usage: gunzip filename
      file classifies the named files according to the type of data they contain
      usage: file *
      date gives you the system date
      usage: date



      Return to top of page







      Distributions

      The kernel is the basis of a Linux system. Fairly early in the evolution of Linux, people other than Linus started putting the kernel together with various software packages. The different combinations of kernel and software packages became known as a distribution. All of the distributions start with one of the Linux kernels and then combine various other software to produce a usable system.

      This early development resulted in a large number of Linux distributions being created. Suddenly, one version of Linux was not required to be everything to everyone, unlike with Windows. This flexibility allowed Linux to grow and prosper.

      Early distributions included (but weren't limited to) Slackware, Yggdrasil, and Debian. The primary distribution in the U.S. today is Red Hat. The primary distribution in Europe today is SuSE. Other major distributions include (but again aren't limited to) Mandrake (which is based on Red Hat), Gentoo, YellowDog (for PPCs), Debian, and Slackware. Visit Distro Watch for a nearly complete list of Linux distributions.

      Another current trend is putting a Linux system on a CD. This approach has the benefit of not destroying data on the systems hard drive and allows users to experiment with Linux without modifying their current installations. One implication is that you can boot a machine and have a working system (from the CD) that can help you recover or analyze data on the local hard drive. The primary Linux-on-CD distribution today is Knoppix.

      It is important to note that the kernel is completely seperate from any distribution. Kernel development and releases continue on their own schedule. When a new kernel is released, distributions take time to get their configuration and tools working with the new kernel (by adding and removing code to and from the kernel).

      Even though most (usually all) of the software in a distribution of software is free (money-wise), distributors still sell Linux. Purchasing Linux usually provides you with printed manuals (books), installtion support, and sometimes commercial software. However, almost every distribution allows you to download a CD ISO image.

      It should be noted that there are three major Windows "clones," namely Lycoris, Lindows, and Xandros. Their goal is to create a Linux system that looks and acts just like a Windows system.

      Return to top of page




      Comparison to Windows

      The combination of the Linux kernel, GNU (and other) tools, and a modern X-Window server with GNOME or KDE provides an experience similar to today's Windows systems. Many Windows-like capabilities have been replicated in the modern Linux/X-Window environment like desktop icons, file browsing, drag-and-drop, GUI configuration tools, etc.

      New Software Installation / Maintenance

      Modern Windows systems usually install software to a common place: "Program Files". Linux systems put most software under /usr, either in /usr/bin or /usr/local/bin. Windows applications typically use a consistant install program like "Wise" or "InstallShield" so that most software installations look and feel the same.

      Red Hat Linux uses RPM, the Red Hat Package Manager. Software on Red Hat systems is bundled in a "package." A package includes all of the binary data for the software, rules detailing prerequisite software, and possibly scripts to be executed before, during, and after installation.

      Packages come in either source or binary form. Binary packages are architecture-specific (i.e. Intel uses i386, i486, i586, and i686; PowerPC uses ppc, SPARC uses sparc, etc.) and can only be installed on the appropriate hardware. The package manger command is rpm, and it sports a wide array of features. Here is a table of commonly used rpm commands and what they do:

        CommandDescription
        rpm -qaList all installed packages
        rpm -qi packageShow information about an installed package
        rpm -qil packageShow information about an installed package including all files in the package
        rpm -qip packageShow information about an uninstalled package
        rpm -qilp packageShow information about an uninstalled package including all files in the package
        rpm -qf fileDetermine which installed package a file belongs to
        rpm -Uvh packageInstall or upgrade a package
        rpm -Fvh packageUpdate an installed package (freshen)
        rpm -e packageUninstall a package
        rpm --verify packageVerify the integrity of an installed package
        rpm --helpGet help on rpm (there are many more options available)

      After a Windows installation, the first thing you need to do is update the system. Similarly, after a Linux OS installation you need to apply critical updates. Windows provides a website to obtain updated software. Red Hat also provides a website to do the same. LSU mirrors updates locally for several versions of Red Hat at http://redhat.lsu.edu/. The Mac OS X system has an updater that you can use to get the updates. I have mine set to daily. This gets all Apple updates.

      I also use the open source package fink to keep my other open source packages up todate.

      Registry

      While Windows maintains a binary "Registry" to hold system and installed software settings, Linux puts everything in files, most of which are text. As shown in our table above, the /etc directory tree in Linux contains most of the files to configure your system and installed software.

      As an example, to change the DNS servers on a Windows machine you have to get to the Network Control Panel applet and navigate through several panels, make the change, and (depending on your Windows version) reboot the machine. In Red Hat, all you have to do is edit the /etc/resolv.conf file.

      Services

      Older Windows v9x use the System Tray to emulate "services" running on the system. Windows NT and above actually implement true services which can be controlled using Server Manager. Red Hat controls services via scripts found in /etc/rc.d/init.d/ and automatically starts or stops these services based on entries in the /etc/rc.d/rcx.d/ directories.

      User Applications

      The Free Open Source Software (FOSS) community has produced software to match almost every application. Following is a very limited comparison of FOSS and commercial software. Items on the same line are not meant to be a direct comparison.

      CategoryCommercial Example(s)FOSS Example(s)
      ProductivityMicrosoft Office
      WordPerfect
      SmartSuite
      StarOffice
      OpenOffice
      AbiWord
      Gnumeric
      GraphicsPhotoshopGimp
      Document LayoutAcrobat
      PageMaker
      Quark
      xpdf
      Scribus
      Web BrowsingInternet ExplorerMozilla
      Firebird
      Lynx
      Links
      Instant MessagingMSN
      ICQ
      AIM
      Yahoo!
      Trillian
      GAIM
      Silc
      Music and Video
      Players
      Windows Media Player
      QuickTime
      WinAmp
      Xine
      XMMS
      MPlayer
      Noatun
      Video AuthoringPremiere
      AVID
      Cinelerra
      kino
      CADAutoCADqcad
      ProgrammingMicrosoft Visual C/C++/Basic
      Intel Compilers
      Portland Group
      GCC
      Eclipse
      Web ServerIISApache
      Web ApplicationsASPPHP
      Perl
      DatabaseDB2
      Oracle
      SQL
      MySQL
      PostgreSQL
      MathMatlabOctave

      It should be noted that many of the packages above can also run on non-Linux operating systems. Additionally, some of the FOSS applications listed above do not have a commercial equivalent.

      Open various applications

      Return to top of page

      Other Useful Commands

      Some of the other commands that you might find useful are:
      quota shows you your quotas on the machine in column format with headers
      usage: quota -v
      dr reports the space left on the file system
      usage: dr
      du outputs the number of kilobyes used by each subdirectory, use in home directory
      usage: du
      gzip Compresses a file
      usage: gzip filename
      gunzip Uncompress a file
      usage: gunzip filename
      file classifies the named files according to the type of data they contain
      usage: file *
      date gives you the system date
      usage: date



      Return to top of page







      A Brief History of Time...

      UNIX

      UNICS (UNiplexed Information and Computing Service) was created at AT&T Bell Laboratories in the fall of 1969 by Ken Thompson and a few other researchers after failed attempts at working on the MULTICS project. Their work was the result of trying to create a multi-user time-sharing operating system. They started licensing their code to universities in 1974.

      "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972

      While on sabbatical in 1978, Ken Thompson helped student Bill Joy write the Berkeley Software Distribution (BSD). AT&T's UNIX became a stable commercial product while BSD's became a research project and teaching tool. This split between AT&T UNIX and BSD UNIX remains today. However, most commercial and free UNIXes are a blend of both.

      It should be pointed out that the first operating system that Microsoft sold in August of 1980 was Xenix their UNIX-like OS that ran on both Intel and Motorola processors. Microsoft did not sell their first version of DOS until 1981.

      Free UNIX-like OSes

      In 1984 and 1985, Richard M. Stallman started the GNU project and founded the Free Software Foundation. His goal was to create a totally free (libris) UNIX-like operating system. Though many supporting tools were written quickly, the kernel, called the Hurd, was many years in coming. In 1985 Carnegie Mellon created the MACH kernel based on a micro-kernel architecture.

      In 1987 Andrew S. Tanenbaum, a professor in Amsterdam, the Netherlands, created MINIX as a teaching aid for his Operating Systems class. This was one of the first complete implementations of a "free" UNIX-like OS, although you had to buy Dr. Tanenbaum's book to get it.

      Starting in the early 1990's there were several projects that branched from BSD. The NetBSD and FreeBSD projects both started in 1993. In 1995 a disgruntled NetBSD contributor left and founded the OpenBSD project.

      History of GNU/Linux

      As part of his schooling at a university in Helsinki, Finland, Linus Torvalds started to write a new filesystem for MINIX. In 1991, after several disputes with Dr. Tanenbaum, Linus decided to write his own operating system. Over time, with the help of others on the Internet, Linus got parts of Stallman's GNU software (shells, compilers, etc.) working with his kernel.

      From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
      Newsgroups: comp.os.minix
      Subject: What would you like to see most in minix?
      Summary: small poll for my new operating system
      Message-ID: <1991Aug25.205708.9541@klaava.Helsinki.FI>
      Date: 25 Aug 91 20:57:08 GMT
      Organization: University of Helsinki
      
      Hello everybody out there using minix -
      I'm doing a (free) operating system (just a hobby, won't be big and
      professional like gnu) for 386(486) AT clones. This has been brewing
      since april, and is starting to get ready. I'd like any feedback on
      things people like/dislike in minix, as my OS resembles it somewhat
      (same physical layout of the file-system (due to practical reasons)
      among other things).
      I've currently ported bash(1.08) and gcc(1.40), and things seem to work.
      This implies that I'll get something practical within a few months, and
      I'd like to know what features most people would want. Any suggestions
      are welcome, but I won't promise I'll implement them :-)
      Linus (torvalds@kruuna.helsinki.fi)
      PS. Yes - it's free of any minix code, and it has a multi-threaded fs.
      It is NOT protable (uses 386 task switching etc), and it probably never
      will support anything other than AT-harddisks, as that's all I have :-(.
      

      In 1994 he released a v1.0 kernel and the associated GNU tools as the first widespread public GNU/Linux distribution. Unlike MACH, the Linux kernel is a monolithic or macrokernel where most of the functionality is implemented in the core of the operating system.

      Return to top of page




      Resources

        Many resources exist at LSU and across the Internet to make using GNU/Linux easier. Here are just a few.

        LSU's redhat.lsu.edu

        OCS's High Performance Computing group maintains the system redhat.lsu.edu to support on-campus users. This system sports a number of features:

        • ISO images so that you can make your own CDs
        • Supports on-campus NFS installs
        • Supports HTTP installs
        • Supports on-campus NFS updates
        • Automatic e-mail notification of updates
        • Provides DOC CDs
        • Everything is web browsable
        • Provides installation and updating instructions
        • Includes several Redhat versions

        Linux Documentation

        The Linux Documentation Project has been around a long time and is one of the most valuable resources around. This project includes many different documents that will ease the use of GNU/Linux. Here are a few examples:

        • The HOWTOs - These are wonderful documents that explain how to do just about everything you could want.
        • The Mini HOWTOs - These are smaller documents that often cover new topics or very simple concepts.
        • The Unmaintained HOWTOs - These are older HowTos that no one is keeping current but they often have useful information.
        • Redhat - Along with selling the dominant U. S. GNU/Linux distribution, they provide numerous guides, patches, and forums.

        Other Important Resources

      Return to top of page


      The statements and opinions included in these pages are those of Kathryn R. Traxler, Isaac W. Traxler, Allen B. Gordon and Brian D. Ropers-Huilman only. Any statements and opinions included in these pages are not those of Louisiana State University or the LSU Board of Supervisors.
      © 1998-2004

      Mail to: Kathryn R. Traxler