Linux
Linux Intro
Windows 2000

Regulations
General Info
Hardware
Software

Roving Profile
Exam Papers

System Support

Links

What is Linux?

Linux is a free UNIX work alike operating system. It basically allows you to turn your PC into a UNIX workstation without the enormous cost. It comes with full source code and oodles of UNIX freeware including the GNU C (and C++) compiler, Perl and Tcl/Tk. Linux runs on a variety of computer architectures, including ARM, SPARC, Alpha, PowerPC, M68k, MIPS, and Intel. Linux is free on the Internet and you can purchase CD-ROMs with Linux for about US $30-$50. Major companies are now endorsing Linux as a platform for their wares, including IBM, Hewlett-Packard, Silicon Graphics, Apple Computer, Oracle, Informix, and Sybase. Linux is used by a number of companies, primarily as a server, and by countless individuals, often as a home UNIX system. For students new to linux it is strongly advisable that you view the ofical red hat linux Getting Started Guide. This is available at file:///usr/share/doc/rhl-gsg-en-7.3/index.html

Short History of Linux

The roots of Linux can be traced back to the origins of Unix TM. In 1969, Ken Thompson of the Research Group at Bell Laboratories began experimenting on a multi-user, multi-tasking operating system using an otherwise idle PDP-7. Dennis Richie soon joined him and the two of them, along with other members of the Research Group produced the early versions of Unix TM. Richie was strongly influenced by an earlier project, MULTICS and the name Unix TM is itself a pun on the name MULTICS. Early versions were written in assembly code, but the third version was rewritten in a new programming language, C. C was designed and written by Richie expressly as a programming language for writing operating systems. This rewrite allowed Unix TM to move onto the more powerful PDP-11/45 and 11/70 computers then being produced by DIGITAL. The rest, as they say, is history. Unix TM moved out of the laboratory and into mainstream computing and soon most major computer manufacturers were producing their own versions. Linux was the solution to a simple need. The only software that Linus Torvalds, Linux's author and principle maintainer was able to afford was Minix. Minix is a simple, Unix TM like, operating system widely used as a teaching aid. Linus was less than impressed with its features, his solution was to write his own software. He took Unix TM as his model as that was an operating system that he was familiar with in his day-to-day student life. He started with an Intel 386 based PC and started to write. Progress was rapid and, excited by this, Linus offered his efforts to other students via the emerging worldwide computer networks, then mainly used by the academic community. Others saw the software and started contributing. Much of this new software was itself the solution to a problem that one of the contributors had. Before long, Linux had become an operating system. It is important to note that Linux contains no Unix TM code, it is a rewrite based on published POSIX standards. Linux is built with and uses a lot of the GNU (GNU's Not Unix TM) software produced by the Free Software Foundation in Cambridge, Massachusetts.

Where do I get Linux

Linux is available in several formats, called "distributions". Each distribution has it's own set of features and functionality that makes it unique. Some distributions are available for download at no charge. Others are provided on CD or floppy disk and have a (usually) nominal charge associated with them. If you don't have a high-speed connection to Internet or a drive that writes to blank CDs then downloading is probably not the best way for you to get a full-featured Linux distribution. You can, though, depending on your location, get Linux free in magazines or from retailers that will sell you a distribution on one or more CDs at very low cost. Distributions obtained in this way do not usually include documentation or support. There are also many books that include a Linux distribution. The main Linux distributions include:

Caldera
Redhat
Linux Mandrake
Slackware
Stampede
SUse
TurboLinux
LinuxPPC
Additional distributions can be viewed at http://www.fokus.gmd.de/linux/

Which is the best distribution

Unfortunately theres no easy answer to this question. Each distribution has its advantages and disadvantages. Mandrake for example is easy to install relative to other distributions of linux. SUse on the other hand has an easy to use system administration tool called "yast". Not only does this program install the SuSE distribution for you, it is also always there when you need to configure the system, long after the installer has disappeared. Slackware is not equipped with a graphical installer so this distribution would be more difficult to install particularly to somebody new to the operating system. The best solution to the dilemma is to evaluate the distribution that you already have. With time you should become more comfortable with the operating system to explore different versions yourself.

Installing Linux

The first thing you need to do when installing Linux is set up a partition for it. Disk partitions have been around since the earliest DOS hard disk days. Basically, what you need to do is reserve space for Linux and separate that space from that used by any other OS, such as Windows. Typically, you create a Linux partition for data, and another, smaller, partition for swap space. Since Windows comes pre-installed on most PCs, this means you must go through an extra step to install any non-Windows OS. To some, setting up a partition makes Linux harder to install. But, this task is necessary for BeOS or any other OS you install on PC hardware, including Windows NT.

Linux on Laptops

Linux will operate as normal on laptops. There are however a number of problem points to watch out for. Most Linux installs involve a boot floppy, a supplemental floppy, and a CD. Thus, you need to access both the floppy and the CD-ROM at the same time. Smaller laptops often shed these devices to save on weight and power consumption. You can get around a missing floppy or CD-ROM drive, but it makes your work harder.

Linux Commands

List Directory Contents
Change Directory
Make a Directory
Print Working Directory
Copy file
Remove Directory
Remove File
Move file /Rename file
During your academic career at the csis department you will encounter and use linux on a frequent basis. To become proficient in the use of this operating system you will need to become familar with a number of key commands. Fortunately linux has a manual with a entry related to each command. To access this information simply type the following
Man command
where command is the specific command on which you want information on. The following is a summary of some of the common commands and some examples related to their use.

ls:List Directory

ls denotes list directory contents. This command lists the contents of the current directory. Directories are denoted by / after the name of the directory. There are many options available with this command. Some of the more useful ones are:

ls- a List all files including hidden files
ls- c List items in columns.
ls- tShow contents sorted by when they were last modified.
ls- S Sort contents by size.

Consult the man pages for more detailed explaination of optional parameters.

cd:Change Directory

cd is a common Unix/linux command for navigating between directories. This command must be typed along with a directory name or pathname indicating that you wish to change to the named directory. Some examples of cd command are given below. Nonetheless you are advised to consult the man pages on cd command for further information.

cd exams (change directory to exams)
cd .. (back out one directory level)
cd (brings user back to their home directory irrespective of location)

mkdir:make a Directory

mkdir is the Unix/linux command for creating a new directory or folder in linux.The command format is
mkdir directoryname
This command creates a directory of the given name.If a directory of this name already exists an error message is displayed. To create a directory called examples you would type the following command:
mkdir examples
Users can also create subdirectories, which are directories inside a directory. To create a subdirectory week1 inside the directory examples

cd examples ( change directory to examples)
mkdir week1 ( make directory week1)
The user can do an ls to view the subdirectory

An alternative way of creating the subdirectory week1 inside examples would be to use the following command:
mkdir examples/week1
To make a new directory in the parent directory use the following format:
mkdir ../presentations
This creates the directory presentations in the parent directory of the current working directory. In effect, this creates a new directory at the same level of the file system as the current directory.
Things to remember include:

Use pwd to determine whether you are in coorect directory
directory names are case sensitive so "names" is different from "NAMES"
Directory names can consist of upper- and lowercase letters, numbers, periods (`.'), hyphens (`-'), and underscores (`_').
Directory names should be meaningful and representative of their contents
Directory names should have no spaces. Use underscores if necessary
View the man pages on mkdir command for further options

pwd:Print Working Directory

The command pwd stands for print working directory. When you type pwd, you are asking your Linux system, "Where am I?" Your system respondes by displaying on monitor the directory you are in ()also known as the standard output). The following image shows the execution of the pwd command

Bash, the shell for your Linux system shows, by default, your current directory. To determine your current working directory use the following steps.

Launch a terminal window ->Menu ->Programs -> System -> Gnome Terminal
Type pwd (lower case letters)
The output should be of the form "/techHandbook/users/ugstud1/username"

For more information view the man pages on pwd. At the terminal prompt type man pwd

cp:Copy file

The CP command in linux is used to copy files from one location to another or make a copy of an existing file. If the last argument names an existing directory, cp copies each other given file into a file with the same name in that directory. Otherwise, if only two files are given, it copies the first onto the second. It is an error if the last argument is not a directory and more than two files are given. By default, it does not copy directories. To copy a file from one directory to another simply cd into the location of the file to be copied. Then type
cp filename destination
An example might be
cp test1.txt /home/sean/documents
Alternatively the full path of the source an destination could be given which would avoid having to cd into the directory of the file to be copied. An example might look like:
cp /home/c0202589/cs4113/assign1.txt /home/sean/documents
To create an exact copy of a file called notes using cp:
cp notes topic1.txt
For details on existing parameters consult the man pages.

rmdir:Remove directory Directory

rmdir is linux command used to delete directories. The command must be used with the name of the directory you wish to delete. For example to delete the directory week1 one would use the following syntax:
rmdir week1
When deleting a directory using rmdir the directory must be empty. If for example week1 was a nonempty directory and we tried to delete it then the following error message would be displayed:
week1: directory not empty
To remove a directory that contains files use the command:
rm -r directory_name

Caution

If you remove a directory that still holds files there is no way to retrieve it without the intervention of the system administrator. To avoid this always use the rm command together with the -i option.
rm -ir directory_name

rm:remove file

rm removes each specified file. By default, it does not remove directories. If a file is unwritable, the standard input is a tty, and the -f or --force option is not given, rm prompts the user for whether to remove the file. If the response does not begin with `y' or `Y', the file is skipped. GNU rm, like every program that uses the getopt function to parse its arguments, lets you use the -- option to indicate that all following arguments are non-options. To remove a file called `-f' in the current directory, you could type either
rm -- -f
or
rm ./-f
The Unix rm program's use of a single `-' for this purpose predates the development of the getopt standard syntax. To following are some examples of rm:
rm filename1 (remove filename1)
rm -f filename1 (remove filename1 without prompting)
rm -i filename1 (remove filename1 interactively)
rm -rf directory (remove directory and contents)
If you type the wrong filename or try to delete a file that does not exist, an error message will be displayed:
rm: cannot remove 'filename': No such file or directory

mv:move file

The mv command is used in linux/Unix to move a file(s) to a new location or rename a file.If the last argument names an existing directory, mv moves each other given file into a file with the same name in that directory.For example:
mv example1.txt /home/c0202589/cs4113/
moves the file example1.txt to the location given on the right.
Otherwise, if only two files are given,it moves the first onto the second. Essentially it renames it for example:
mv list.txt names.txt
renames list.txt to names.txt.
mv directory1 directory2
renames directory1 as directory2.It is an error if the last argument is not a directory and more than two files are given. It can move only regular files across filesystems. If a destination file is unwritable, the standard input is a tty, and the -f or --force option is not given, mv prompts the user for whether to overwrite the file. If the response does not begin with `y' or `Y', the file is skipped.

Other Linux Commands

The following commands may prove useful from time to time. They are not as commonly used as the above but are still quite useful.

locate filename
whereis executablefile
which executablefile
ps
kill process id number
apropossearchstring
info mycommand

Linux Interfaces

One of the main areas that separate Linux applications from Windows or MacOs apps lies in the area of interface standards. Linux provides the freedom to use any user interface-programming library you choose. That's the good side. You can experiment with new interface styles and find the one you like. The bad side is that there is no single standard for user interfaces on Linux. Thus, one application doesn't always look like the next. Worse yet, the skills you learn for navigating a particular application don't transfer well to other applications. This can be a real drawback towards ease of use on Linux.

It used to be that the UNIX world faced interface wars between OpenLook, from Sun and AT&T, and Motif, from everybody else. Eventually, that war faded away with Motif the clear winner, and long after UNIX lost any hope of capturing the desktop from Windows.

Since Linux supports the X Window System, it gives you access to the full set of X programming APIs. The main development effort now revolves around KDE and GNOME.

KDE and GNOME

KDE and GNOME are both complete world interfaces. Both work best with applications designed to fit into their factions. Both include a set of desktop applications, including window managers, file managers, and a framework for applications to communicate. Both KDE and GNOME provide programming APIs--different programming APIs, alas. RedHat chose GNOME and funds some of GNOME's development. (RedHat also includes KDE with its distributions, though. KDE, or K Desktop Environment is written in C++ and uses the semi-free Qt library from Troll Tech in Norway. A problem lies in the fact that Qt redefines C++, which means you must use Troll Tech's C++ preprocessor on all your applications. GNOME, is built on top of gtk, the GIMP toolkit, a C-based toolkit created to support the GIMP imaging application. Which desktop is best depends on personal opinion.

tip If you have both GNOME and KDE installed on your system, it is possible to switch between them. For example, you can use the KDE email client, KMail, while you are working in GNOME. You will find access to the KDE applications in the Main Menu (the stylized foot at the bottom of the screen) under KDE Menus.


Department of computer science and information systems
University of limerick, limerick, Eire

Department of Computer Science and Information Systems, University of Limerick, Limerick, Eire
Valid HTML 4.01! Valid CSS!