Axian Software Consulting and Training

Linux Hands-On Programming

 

Custom Classes:

Axian specializes in customizing our classes to meet your specific needs.  Please call or e-mail us with your requirements.

Axian, Inc.

4800 S.W. Griffth Dr., Suite 202, Beaverton, OR 97005

Phone: (503) 644-6106

Fax: (503) 643-8425

info@axian.com

www.axian.com


Call 644-6106, ext. 107

or

e-mail Axian training

for course registration or more information


Course Files and Links:

 

 

 


COURSE OBJECTIVES

Linux Hands-On Programming is designed to quickly bring experienced programmers up to speed in a Linux environment. Upon completion of the course, students will be comfortable working with Linux/Unix commands and utilities and doing program development.  Note:  This course combines the content of Axian's two courses: Linux Use and Administration and Linux Programming and Introduction to X.

Students will learn:

  • Programming in C in a Linux environment.
  • What Linux is: The relationship between Linux, Unix, and Microsoft Windows.
  • Installation, basic system administration, and customization.
  • Shell programming.
  • Linux Tools including file operations and utilities, process control, documentation and printing.
  • Linux Concepts/Techniques including standards and compliance, working with files, processes and signals, inter-process communication, semaphores, messages, shared memory and sockets.
  • Linux Programming in C including makefiles, version control, compiling, linking and debugging.
  • GUI Development using the X Window System including X concepts, basic X programming in C, window attributes, the graphics context, drawing graphics and text, color, events, keyboard and mouse.
  • Developing a Netscape plugin.

TEXTS

  • Beginning Linux Programming by Neil Matthew & Richard Stones
  • Linux in a Nutshell by Jessica Perry Hekman
  • Xlib Programming Manual by Adrian Nye
  • Red Hat Linux 5.2 Installation Guide by Red Hat Software
  • Linux/etc by Terry Griffin; articles reprinted from Computer Bits magazine, Nov. 1996 - Jan. 1999

INSTRUCTIONAL APPROACH

This course will be taught in a classroom with one computer per student. The emphasis will be on hands-on programming, with roughly one half of the total time being spent on labs and exercises. The Red Hat 5.2 Linux distribution will be used with the KDE desktop environment.

The class is divided into 41 sessions, each consisting of both lecture and lab. The lectures are intended to be interactive and will include review of the lab assignments. The sessions range from 0.5 hours to 5 hours, and are presented over a period of 11 days.

PREREQUISITES

Students should be proficient in the C programming language.


LINUX HANDS-ON PROGRAMMING

Course Outline


  • SESSION 1: Starting up: Installation of a Linux distribution (Red Hat 5.2)
    Topics:
    • Preparing the PC/Workstation for Linux
    • Multiple operating systems and disk partitioning
    • Hardware issues and compatibility (graphics accelerators, monitors, network cards, printers...)
    • Methods of Installation (local CDROM, nfs, ftp, smb)
    • Package selection (software choices)

  • SESSION 2: Starting up: Customizing the Linux Desktop
    Topics:
    • Window managers and Desktop environment
    • Installing KDE (K Desktop Environment)
    • User accounts and system administration. Customizing KDE.

  • SESSION 3: Starting up: Text Editing
    Topics:
    • Using Kedit ( the default graphical text editor for this course)
    • Basic vi and emacs 

  • SESSION 4: Starting up: Introduction to the Bash Shell
    Topics:
    • Shell choices (sh, bash, csh, tcsh, ksh, etc.)
    • logging in, logging out, shell initialization
    • Interactive shells
    • Pipes and redirection
    • aliases
    • environmental variables.
    • Creating and executing scripts.
    • Shell syntax. variables, conditionals, functions.
    • Debugging

  • SESSION 5: Linux Fundamentals: History of Linux
    Topics:
    • Unix
    • Other Unix-type OS's for the PC (FreeBSD, OpenBSD, NetBSD)
    • Linux

  • SESSION 6: Linux Fundamentals: Linux today
    Topics:
    • Linux and Open Source Software (OSS) as a development environment. How revisions are made, bugs fixed, drivers written, technical support obtained.
    • Relationship with Gnu and the Free Software Foundation
    • Linux distributions
    • Linux resources.
    • Licenses and legalities.

  • SESSION 7: Linux Fundamentals: Linux architecture
    Topics:
    • Kernel; what is in the kernel, what is not.
    • modules
    • device drivers

  • SESSION 8: Linux Fundamentals: File system
    Topics:
    • layout. Use of /root, /bin, /sbin, /usr, /usr/local, /home, /etc, /tmp, /proc, /dev, etc.
    • symbolic links
    • mounting other file systems, such as MS
    • nfs, samba 

  • SESSION 9: Linux Fundamentals: window managers, desktops, GUIs
    Topics:
    • Relation to OS and the kernel
    • X (servers and toolkits)
    • Window Managers, Desktop Managers and combined window/desktop managers.
    • Virtual terminals
    • Keys (backspace, delete, stty, xmodmap)

  • SESSION 10: Linux Fundamentals: Differences
    Topics:
    • Differences between Linux and Windows 9x and NT
    • Differences between Linux and other commercial Unix operating systems

  • SESSION 11: Linux Tools: File operations
    Topics:
    • Some basics (again); environmental variables,
    • stdin/stdout/stderr, redirection, piping, special characters
    • Files and directory creation and manipulation
    • copying (cp)
    • moving, linking (mv, ln)
    • listing(ls, df, du)
    • finding (find, locate)
    • file types (file)
    • touch
    • security, permissions
    • users, passwords, groups
    • changing ownership, groups, permissions (chown, chgrp, chmod)

  • SESSION 12: Linux Tools: More file utilities
    Topics:
    • comparing files and patching (diff, diff3, cmp, patch)
    • Archiving and compression ( tar, cpio, gzip, zip/unzip)

  • SESSION 13: Linux Tools: Process control
    Topics:
    • starting processes, delayed, background, foreground (use of &, at, cron, bg, fg, nice)
    • killing/interrupting (kill, Ctrl-Z, Ctrl-C)
    • monitoring processes (ps, top, xosview) 

  • SESSION 14: Linux Tools: Documentation
    Topics:
    • man (and xman)
    • info
    • /usr/doc
    • foo -h, foo -help
    • HOWTO's 

  • SESSION 15: Linux Tools: Printing
    Topics:
    • lpr, lpq, lprm
    • local and network printers

  • SESSION 16: Linux Programming: Package Overview
    Topics:
    • ghostview
    • perl
    • java
    • tcl/tk
    • expect
    • tex/latex
    • apache

  • SESSION 17: Linux Programming: Make
    Topics:
    • Makefiles for simple applications
    • more complicated rules
    • making libraries
    • building large projects

  • SESSION 18: Linux Programming: Version control
    Topics:
    • RCS
    • CVS 

  • SESSION 19: Linux Programming: Compilers
    Topics:
    • gcc, g++, ecgs
    • commercially available compilers
    • other languages

  • SESSION 20: Linux Programming: Linking and loading libraries.
    Topics:
    • transition from libc5 to glibc
    • static libraries (*.a, like Windows .LIB)
    • library tools (ar, ranlib)
    • shared libraries (*.so, like Windows DLL)
    • manipulating shared libraries( ldd, ldconfig)
    • stripping executables (strip)
    • ld (loader) 

  • SESSION 21: Linux Programming: Debugging and profiling
    Topics:
    • gdb ( and xxgdb)
    • ddd
    • Electric Fence
    • gprof

  • SESSION 22: Concepts/Techniques: Standards and Compliance
    Topics:
    • Posix compliance
    • Linux standards
    • Living in a heterogeneous world
    • Cross platform issues and portability.

  • SESSION 23: Concepts/Techniques: Working with files
    Topics:
    • Files and Devices
    • System Calls, device drivers
    • Low Level File Access
    • I/O Library
    • File and directory maintenance

  • SESSION 24: Concepts/Techniques: Processes and Signals
    Topics:
    • Process Structure
    • Scheduling
    • Starting New Processes
    • Waiting; zombies, redirection; threads
    • Signals

  • SESSION 25: Concepts/Techniques: Inter-process communication
    Topics:
    • Process Pipes
    • parent and child processes
    • named pipes (FIFO's)

  • SESSION 26: Concepts/Techniques: Semaphores, messages, shared memory
    Topics:
    • Semaphores
    • Shared Memory
    • Message Queues 

  • SESSION 27: Concepts/Techniques: Sockets
    Topics:
    • Socket attributes
    • Using Sockets
    • Socket Addresses
    • Communications
    • Byte Ordering

  • SESSION 28: Concepts/Techniques: Overview of Unix Scripting Languages
    Topics:
    • MS-DOS/MS-Windows Analogy
    • Awk
    • Tcl
    • Perl
    • Python

  • SESSION 29: Concepts/Techniques: Where Java fits in
    Topics:
    • Advantages, disadvantages
    • Java Script
    • Java tools for Linux

  • SESSION 30: X: Overview of GUI Development using the X Window System
    Topics:
    • Versions of X
    • X Window System Concepts
    • X Window System Software Architecture
    • Overview of Xlib

  • SESSION 31: X: Concepts
    Topics:
    • How Xlib works
    • What are windows?
    • Introduction to X Graphics
    • Window Characteristics
    • Introduction to Events

  • SESSION 32: X: Basic Window Program
    Topics:
    • Running the Program
    • The Main of basicwin

  • SESSION 33: X: Window Attributes
    Topics:
    • Setting Window Attributes
    • Window Attribute Structures
    • Program-settable Attributes

  • SESSION 34: X: The Graphics Context
    Topics:
    • Creating and Setting a Graphics Context
    • Switching between Graphics Contexts
    • Controlling the Effect of a Graphics Primitive
    • Line Characteristics
    • Patterning

  • SESSION 35: X: Drawing Graphics and Text
    Topics:
    • Fonts and Text
    • Regions
    • Cursors
    • Bitmap Handling 

  • SESSION 36: X: Color
    Topics:
    • Color Terms and Concepts
    • Allocating Shared Colors
    • Storing Private Colors
    • Standard Colormaps

  • SESSION 37: X: Events
    Topics:
    • Event Processing
    • Event Types
    • The Event Queue
    • Handling Events
    • Selecting Events
    • Sending Events

  • SESSION 38: X: The Keyboard and Pointer
    Topics:
    • The Keyboard
    • The Pointer
    • Border Crossing and Keyboard Focus Events
    • Grabbing the Keyboard and Pointer
    • Keyboard Preferences
    • Pointer Preferences 

  • SESSION 39: X: Netscape Plugins(1)
    Topics:
    • Relationship of browsers (Netscape in particular) to the X window environment and window managers
    • Plugins vs Java applets
    • Obtaining the LiveConnect/Plugin SDK

  • SESSION 40: X: Netscape Plugins(2)
    Topics:
    • Compiling and running simple examples, templates
    • Constructing a plugin

  • SESSION 41: DHTML and Netscape
    Topics:
    • Differences between DHTML in a Microsoft environment vs. DHTML under Netscape running in a Linux environment

LINUX HANDS-ON PROGRAMMING

(c) COPYRIGHT AXIAN, INC. 1999