This presentation will describe what linux can do.
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.
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.
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.
Demonstrate the following:
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.
Demonstrate the following:
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:
Demonstrate the following: