What Linux Can Do

Aim

This presentation will describe what linux can do.

What is Linux?

Many people ask me, "What is linux?" But the answer is a computer science thing, and that's not really what they want to know. What they mean is "What can linux do? Is linux useful for me?" So this presentation is about what linux can do. If you really want to know what linux is, then click here .

So what can linux do? Not very much. Linux is just an operating system kernel. The kernel is the software that communicates between applications and the devices on your machine. The kernel doesn't communicate with you. For instance, the kernel doesn't put the command prompt on the screen - that's an application. The kernel doesn't even control the windowing environment - that an application too. When someone asks "what can operating system XYZ do?" they usually mean, what applications are available. So we're going to spend most of our time talking about applications.

Most of these applications are provided by the GNU Project . The GNU Project is run by the Free Software Foundation. The GNU Project is similar to the linux project in that its goal is to create a free Unix clone. However whereas the Linux project started by writing the operating system kernel, the GNU programmers started at the other end by writing the applications. So the GNU work and the linux work coincided to create a complete operating system. Since the GNU Project is older, and contributes much more code, a better name for the operating system is GNU/Linux .

Finally, some of this presentation is specific to Intel x86 hardware. Of course, linux and its applications run on other platforms such as Sun Sparc, SGI Indigo, Apple Macintosh, Commodore Amiga, and Atari.

Turning it On

Lets start at the beginning. What happens when you turn on a linux box? First, the BIOS will do a power on self test - that's built into the hardware. Next the boot loader takes over. A boot loader is a small program that fits in the boot sector of your hard drive and allows the user to select between multiple operating systems. If you have used an Apple or Microsoft computer, then you probably never saw the bootloader because it didn't give you any choices, it just booted MacOS or Windows. But almost all linux installations include a choice of operating systems from the bootloader. Even if all you use is linux, a boot loader is handy because you might choose between different versions or different hard drives. So you select a version of linux and the boot loader loads the linux kernel. You see lots of messages as the kernel detects your hardware and loads the appropriate modules. Next the kernel activates the first process, named "init". The "init" process has the responsibility of activating all the other processes. You see lots more messages on the screen, this time in colour with [OK] messages after them. Usually this means that init is launching demons. Demons are processes that are always running in the background, such as the print queue (lpd) and the internet demon (xinetd). Finally init launches a login process. Actually, init starts several login processes. Usually init will start six text logins and sometimes one graphical login. You can customize init to do what you want, of course.



Bash

After a successful text login you will find yourself in a command interpreter names "bash". In Unix-speak, a command interpreter is called a shell. Bash is the Bourne Again SHell (the second version of the Bourne Shell). If you like Microsoft DOS, then you will feel at home in bash. But there are a few differences. For instance, use the other slash symbol to separate directories in a fully qualified filename. Here are some common bash commands:


cd directoryname

Change directories. If you don't specify a directoryname, then cd will change to the user's home directory.

ls [options] [file]

List information about the file. The default file is the current directory, so if you just use "ls" then it will list the files in the current directory. Userfull options are "-a" which causes hidden files to be listed and. "-l" which causes list to display more information about each file.

pwd

Display the name of the present working directory.

cat filename

Display the contents of file. Can be used to write a file from stdin (see the Redirection section, below)

less filename

Same as cat, but will pause when the screen is full, and you can use the up and down keys to move the focus.

cp source_file dest_file

Copy source file to destination file.

mv source_file dest_file

Move file. If a file is moved within a filesystem, just the inode is moved. But if the file is moved from one filesystem to another, then the data is copied and the original file is removed.

rm filename

Remove a file.

mkdir directoryname

make new directory "directoryname"

rmdir directoryname

remove a directory

vdir

same as "ls -la"

grep PATTERN [file]

grep searches the named files (or stdin if no file is named) for lines containing PATTERN. By default, grep prints the matching lines.

man commandname

format and display the on-line manual page. This is the old format for linux help documents.

info commandname

read info document. This is the new format for linux help documents.

vi filename

run the "vi improved" text editor

ps [-A]

report process status. -A flag causes all processes to be listed

top [options]

show all running processes, in descending order of CPU utilization (sort order may be changed by options). 

Alt-F1, Alt-F2, etc
This isn't really a command, it's a keystroke combination to change virtual terminals. Use Alt-F1 to change to terminal 1, Alt-F2 to change to terminal 2, etc.


For those who are hooked on MS DOS, there is a dos emulator but you shouldn't need to use it. Most common DOS applications have bash clones. For instance, there is a file manager named Midnight Commander (mc), there is a terminal emulator named minicom (a clone of telix), and innumerable other packages. I implied that bash is equivalent to DOS, but that's not really true - bash is a lot more powerful than DOS. But I've been talking too long and now it's time for the first demonstration.

Bash Demonstration

Demonstrate the following:

X Window System

You might have got the impression that the GNU/Linux system is a hodge-podge of software written by people all over the world, connected together by the internet. You are one hundred percent correct. And another piece of this software jumble is the X Window System. Originally developed at MIT, the X Window System is a minimal graphical user interface. Notice that it is called X Window, not X Windows . We use a version of X Window called XFree86 . But it's usually just called X. X provides the mechanisms to create a windowing system, but doesn't apply any rules. For instance, you might be used to minimize windows, and having the minimized windows appear as an icon at the bottom of the screen. X will allow you to minimize windows, and will allow you to create icons at the bottom of the screen, but it doesn't put the two together. The rules are created by another piece of software called a window manager . But different window managers behave in different ways, and different applications will behave in different ways if they use different widgets libraries (widgets are those buttons and sliders that are popular in graphical interfaces). So if we want all our application to behave the same, then we need a group of rules. The rules specify a "desktop environment" and linux has two desktop envirnonments, Gnome and KDE .

So where does this leave us? It leaves us with a fully featured Graphical User Interface with consistent look and feel between applications. And it was all done in little pieces by people all over the world connected by the internet.

X Window Demonstration

Demonstrate the following:

Internet

Linux was made possible by the internet, and internet capabilities were built into it from the beginning. In fact, Linux probably won't work properly if you try to install it without socket support - sockets are the basic programming interfaces of the internet and are critical to Linux function. Linux supports the three basic internet functions: web browser, email, and ftp.

Linux also supports these lesser used applications:

  1. telnet; secure shell
  2. Instant messaging
  3. IRC, ICQ
  4. peer-to-peer file sharing (i.e. napster, gnutella)
  5. CDDB
  6. Usenet news

Internet Demonstration

Demonstrate the following:

Office Applications

Linux has all the basic office applications: wordprocessor, spreadsheet, presentation software, business accounting, personal accounting, drawing, painting, etc. Evolution is powerful personal information manager (PIM) which combines calendar, email, and other functions. The big question surrounding office applications is "Will my existing documents work with linux?" The answer depends on what you are doing. StarOffice can read most Word and Excel documents. Other applications, like visio and WordPerfect, are harder to transfer. You might have to save the document in a common file format like RTF in order to transfer it to linux.

The biggest concern with linux office applications is the printing. If you do your printing at home, you should try out your printer with linux. A few printers won't work with linux, and many printers are very slow. If you have a postscript printer, or just do line printing (e.g. dot-matrix) then that will work fine.

Office Demonstration

Demonstrate the following:
  1. StarOffice 5.2
  2. gimp
  3. dia
  4. ical

Entertainment

Linux supports multimedia applications. Linux can play DVDs, although software installation is a bit annoying. Linux can play audio CDs, mp3 files, wav files, and most of the movie formats liked mpeg and divx. If you record sound, linux supports that and has a wave-studio type of software, although I have never used it. Linux gaming is more limited than on Microsoft Windows. Most of the big name games have been ported, but little games like my daughters "Math Blaster" game don't work on Linux.

I should mention that games and multimedia use a lot of hardware resources. For instance, your graphics card must have 3d acceleration to run Quake III. When using linux, these hardware requirements are aggravated by lack of support from some hardware vendors. So if you want to run games, you should have a good idea of what your hardware is and check what drivers are available. The best thing to do is to send email to the local linux users group before buying new hardware.

Entertainment Demonstration

Demonstrate the following:
  1. DVD using xine dmd
  2. CD audio using grip
  3. xmms
  4. play quake
  5. play freeciv
  6. play loki_demo

Programming

At first I wasn't going to talk about programming, but I changed my mind because programming is what got me and Dan interested in Linux, and maybe you are interested in programming also. Linux has excellent programming tools: editors, source navigator, compilers, scripting languages, etc. You can develop on linux for linux, or cross-compile for another environment like Microsoft Windows (yes, many people develop Windows software using linux). From my point of view, the best thing about developing software using linux is that all the documentation is open - Linux International Inc isn't hiding any secret documentation in their forbidden library. In addition to the source code, you get free documentation and you can also buy third-party documentation if you wish.

We won't demo the programming utilities. If you are interested in programming, then please see me or Dan after the meeting.

Linux Limitations

I have three gripes with linux:
  1. Printing is slow.
  2. Spellchecker isn't very good.
  3. My daughter's games don't work.
In addition to these three limitations, the hardware compatibility issue is still a problem for many people. The biggest hardware issue is the graphics card. Almost any graphics card will work, but if you want to do the fancy stuff, like 3d accelerated graphics, then some graphics cards are better supported than others. The best supported is Matrox, which happens to be a Canadian company. ATI is also good. NVidia isn't as good as ATI.

Getting Help

If you buy a copy of Redhat or Mandrake at Business Depot or CompuCentre, then you should get a 1-800 number to call for installation assistance. You should also be entitled to follow up technical support for several months.

Very few people buy copies of Redhat or Mandrake. Usually they get a copy from a friend or from the local linux users group. This is entirely legal - linux is free software. If you get a free copy of linux, then you should seek assistance from a linux users group - usually called a LUG. LUGs operate over the internet using email and websites, so you need to get the network connection working before you can contact the LUG. Fortunately, most LUGs will run installfests, where experienced linux people will install linux on your computer and get the network connection going for you. There are thousands of LUGs operating over the internet. You don't have to join the LUG that is geographically closest to you. If you know how to write german, then you could join a German LUG. But sometimes knowing a linux guru who lives nearby can be helpful.

Conclusion

Linux has many applications and can support many activities and the number of linux application is growing every day mainly due to the excellent programming tools. Linux has some limitations, but there are many user groups available to help you avoid the troublespots.