The GNU/Linux Operating System - Conan Albrecht - Brigham ...

candlewhynotΔιαχείριση Δεδομένων

31 Ιαν 2013 (πριν από 4 χρόνια και 11 μήνες)

252 εμφανίσεις

The GNU/Linux Operating System

Introduction and Applications


Dr. Conan C. Albrecht

Brigham Young University


Linux Penguins

Linux Penguins

Linux Penguins

Linux Penguins

Linux Penguins

Linux Penguins

History and Philosophy


Written by Linus Torvalds in Norway


Operating systems ‘by nerds for nerds’


How does Linus feel about Microsoft?


He (supposedly) doesn’t follow them at all


Linux just needs to be better

than the last Linux


Linux is actually only the kernel


Current compressed kernel is ~ 1MB with ~ 4 million LOC


Most of the “Linux” OS is actually developed by third
-
party developers and/or companies


GNU wrote a huge part of the “OS”
-

Richard Stallman


Filesystems, GUI, File managers, Shells, etc.

The Free Software Foundation


GNU (GNU’s Not Unix) Public License


Free as in Beer


“I’ll share my famous beer, but not my recipe”


Free as in Speech


Please add to my recipe, make it better, and publish


GNU software must have source available


Selling software/making money is OK under the GPL


Catch: All derived works must also be released under
the GPL


Some call the GPL ‘viral’.


Similar to academic vs. corporate research

Built on Unix Roots


Unix OS graph

http://www.levenez.com/unix/history.html


Single
-
purpose tools that work together


Piping ‘|’


Layering of tools


Allows micro
-
upgrading


Provides robustness


Example


ps aux | grep


ps aux | less

Overview

Linux is actually
only the kernel

Separate groups
create each
component

Each component is
separately
upgradeable

--

Gerrit Muller, Phillips Research

Distributions


Gathering the components, compiling them, and
making them work together is a major undertaking


Distributions are organized groupings of components
suited to some task


Popular distributions


Purist


no company involved


Debian, Gentoo


Commercial


RedHat, Mandriva, SUSE, Ubuntu


Specialized


Knoppix
-

Linux on a bootable CD


Linux for PS2 and Dreamcast, Intimate (Debian) for iPaq

Related Operating Systems


Berkeley Software Distribution (BSD)


FreeBSD, NetBSD, OpenBSD


Mac OS X


Next generation of NeXT operating system


Vendor
-
Specific


Solaris


Sun Microsystems


HP
-
UX


Hewlett
-
Packard


AIX


IBM


IRIX


Silicon Graphics


Most ‘Linux’ applications also run on other
Unix platforms

Multi
-
User


Linux is not only multitasking, but also
multiuser


Different users can log in using
separate monitors and keyboards and
run programs separately


The GUI is not shared, but separate for
each user


Directory Structure


Unix uses a single root to the entire
filesystem


Drives/floppies/network shares/CDs are
‘mounted’ to different directories


This virtual filesystem ensures that
application locations do not change over
time, even when hard drives are added


Directory Structure

/





(root)

/etc


(configuration files)

/dev


(hardware devices)

/home


(user data files ‘My Documents’)

/lib


(shared libraries


similar to DLLs)

/mnt



(removable drives, floppies, CDs)

/tmp


(shared temporary directory)

/usr


(shared applications


‘Program Files’)


There are more

these are the primary ones

Permissions


Most Windows’ users are not used to file
permissions


Inconsistencies account for major portion of
problems for novice users


Only root user has access to everything


Only run as root when upgrading, installing, etc.


Normal users only have access to their data


Read access to regular application files

Permissions


Benefits


Inhospitable environment for viruses



Can’t delete or break applications or
system accidentally



Example


Show user, group, other (
-
rwx
rwx
rwx
)

Configuration Files


Text
-
based


Plain text


XML


Entire system startup is done with
scripts


Customizable


Debuggable


/etc directory is the Linux
-
version of the
Windows’ registry

Exciting Applications

In Linux, of course



SSH and SCP


Secure Shell (SSH)


Use any Unix computer anywhere in the
world, just as if you were there


Secure Copy (SCP)


Copy files from any computer to any other
computer


Examples…

VNC and Remote X


Virtual Network Console (VNC) is a
free, cross
-
platform remote access app


GUI and processing run remotely


Remote X runs GUI applications on a
remote server


GUI runs locally, processing done remotely


Examples…

Apache


Most used web server on the Internet


http://www.netcraft.com/


SAMBA


SMB is the protocol for Windows’
Network Neighborhood


Allows Linux to participate in Windows
networks


Linux can even be the main ‘Windows’
file and print server for the network


Robust, cheap, and fast

Tab Character in Shell


The keyboard is faster than the mouse
for repetitive actions


While Linux has 15
-
20 file managers,
most people end up using the shell


The tab key finishes directories and
filenames in commands


While a simple improvement, it’s one of the
best things about Linux!


Example

MySQL and PostgreSQL


Open
-
source databases very
competitive to MS
-
SQL Server


Both come preconfigured and
preinstalled in most distributions


Serve as robust, inexpensive, and fast
back
-
ends to MS Access or Visual
Basic applications

Window Managers

See http://xwinman.org/

Linux Resources

Linux Gotchas


Technology


Security


Windows’ users worry about virii


Linux users worry about hackers


Text
-
based configuration files


Directory and file permissions


Mounting drives

Linux Gotchas


Philosophy


Too much choice (overwhelmed)


You’re in the minority


Companies might not provide drivers or help


Coworkers are on Windows


CSRs may not support you


Linux is still not as refined as Windows


Usability increasing significantly every six
months


How to Test Drive Linux


Dual
-
boot

1.
Partition your drive with Partition Magic


10 GB for Windows (NTFS)
-

primary partition


10 GB for Data (FAT32)


10 GB for Linux (ext3)

2.
Install Windows first (probably already done)

3.
Install Linux from CD


Installer will put GRUB or LILO that allows you to
select when you start your computer

4.
Force yourself to use Linux for tasks

How to Test
-
Drive Linux


Try Knoppix Linux


http://www.knopper.net/knoppix/


Runs entirely off the CD


True Linux install, but read
-
only filesystem


Not as fun as a hard drive installation, but
will let you test Linux without changing your
system


Where to Get Help


groups.google.com


Almost every question has been asked before


HOWTOs


How to do common tasks in Linux


DOS/Win to Linux HOWTO


linuxdoc.org


man pages


The standard Unix “man”ual for applications


Google “linux newbie”


Linux User Groups


BYU’s Unix Users Group (UUG)