Linux/Unix Resources
Unix is an operating system first developed in the 1960\'s and continually improved and updated since then. It comes in many "flavors", all of which share a common suite of programs that allow users to work with the computer (e.g., find, move, copy and run files/programs). Material provided here focuses on flavors of Linux/Unix most prevalent at Purdue, these include Sun/Oracle Solaris, GNU/Linux, and MacOS X. None of these perform exactly the same way, but they are so close to each other that in most cases a single set of training materials can be used. Where significant differences arise, they will be identified and described, but in most cases the differences arise in very slight changes in behavior - different headings on columns, different flag options required, different name for the same utility program - that are not difficult to address or even ignore.
Linux/Unix Books
There are way too many books about the Linux/Unix operating system to list here many of them very good, but directed towards different learning styles and levels. This list includes books that I use, or that students in my class have found particularly useful.
- Sobell, M. G. (2010), A practical guide to Linux commands, editors, and shell programming. This is my preferred book for teaching Linux/UNIX. It is Available on-line through the Purdue Library. Also available on-line.
- Siever, E., S. Spainhour, J. P. Hekman, S. Figgins, LINUX in a Nutshell. A good comprehensive reference book. Available for download at IT eBooks.
- Gilly D., UNIX in a Nutshell. A good comprehensive reference book, similar to the Linux book but without the sections on system administration which may not be that useful if you are not maintaining your own system. The last edition I checked out also does not include the bash shell language which is far more common on Linux systems then UNIX systems.
- Dulaney, E., Linux All-in-One for Dummies. Beginner and Intermediate materials for using Linux, heavy on setting up your own system and system administration. Available for download at IT eBooks.
- Barrett, D. J., Linux Pocket Guide. A reference book for those who simply need to remember a command. Available for download at IT eBooks.
On-Line Reference Materials and Tutorials
Linux/Unix Tutorials
- General Unix/Linux tutorial material
- Ryan\'s Tutorials is a set of excellent, in-depth tutorials. I suggest starting with the Linux tutorial, then continuing with the Bash scripting tutorial.
- Unix Tutorial for Beginners
- Linux command reference
- Tutorials for getting started with specific Unix/Linux systems
- Getting started on ECN Linux systems
- Getting Started on the Brown Cluster (limited to PHIG members)
- A tutorial for compiling and running jobs on the Purdue cluster computer systems (uses the VIC hydrology model)
- Linux history
Text Editors
-
The emacs editor - preferred for ease of use with its GUI interface and powerful options\
-
The vi/vim editor - simple yet powerful, standard on all Unix/Linux systems and will work even across slow network connections, so it is a good idea to learn some basics of this editor
Bourne Again Shell (bash) Tutorials and Reference Materials
Given that our last Solaris system has been retired and BASH is now standard on most Linux installs, I will begin teaching BASH instead of (T)CSH as part of my class starting in the Spring of 2015. Many of the existing scripts will still work, but it will take some time to check that everything works with BASH. If you find something that does not work with BASH, please inform Dr. Cherkauer.
C-Shell (csh) Tutorials and Reference Materials
I have used and taught (T)CSH for many years, but starting in Spring of 2015, I will start converting my teaching materials to BASH. CSH is still available on most platforms, while BASH may not exist on Solaris and other Unix systems, but there is a lot of overlap between the two scripting languages so for most people learning one or the other will be sufficient for most activities.
- cshTutorial
- Unix shell scripts
- Unix: A summary of the C-shell
- C-shell tutorial: despite the name this is more of a summary of basic C-shell functions and methods
- C-shell programming
tutorial: this a more advanced
tutorial demonstrating techniques for programming in C-shell, you
should be familiar with Linux/Unix and basic C-Shell commands before
trying this tutorial.
- This tutorial is written as if you have access to several script
files, however, they provide the contents of these files as part
of the tutorial. To create the script files:
- Use emacs to open a new file with the same name as the required file,
- Copy the contents of the file from the tutorial document
(highlight, then
-c), - Paste the contents into emacs (click middle button, or
- on Mac), and - Save the file (
-x -f).
- This tutorial is written as if you have access to several script
files, however, they provide the contents of these files as part
of the tutorial. To create the script files:
- Advanced Unix - C-shell Tutorial
- File manipulation in C-shell
GREP and Regular Expressions
AWK Programming
X-Windows
X-windows is the base graphics package for almost all Unix/Linux installations. It provides graphical links between systems so that windows opened on the Linux/Unix system can be opened on any machine (local or remote from the current log in session). You MUST have an X-windows client running on your local system in order to open windows from the remote system.
- Wikipedia on X-Windows
- Common Client Programs (see Setting up Computers Outside of
Class for
details on installing this software)\
- Windows
- Installing Cygwin/X with the Cygwin Linux emulator is the accepted policy at Purdue
- Other 3rd Party X-Windows applications are available for free or for a price, but they are not supported by Purdue so install at your own risk.
- MacOS X
- The default X-windows installation is fine, but
- XQuartz provides better performance and is a complete installation of the latest port of X-Windows to the MacOS X operating system
- Windows
Commonly Installed Software Packages
- Graphics Programs
- xfig - a [free and open source] vector graphics editor which runs under the X Window System on most UNIX-compatible platforms (Similar to Freehand or Illustrator).
- gimp - GNU Image Manipulation Program - a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring (similar to Photoshop).
- Ghostview - the base viewer/interpretor for Postscript, EPS and PDF files.
- GSview - more user friendly viewer that still relies on Ghostview to render the Postscript, EPS and PDF files.
- ImageMagick - software suite to create, edit, compose, or convert bitmap images.
Using Linux commands on Windows
Windows is one of the few remaining computer operating systems that does not
borrow substantailly from the open source Linux or Free BSD code base.
Mac OS X, Chrome and the Android operating systems all have a fundamental
connection with Linux so access to Linux style commands are provided natively or can be accessed with installation of a package management system (see Setting up computers outside of class for more details on Mac OS X).
For windows the following options are most common:
-
Preferred: Windows Subsystem for Linux (WSL) is a feature of Windows (first added in 2016) that allows you to run a Linux environment on your Windows machine, without the need for a separate virtual machine or dual booting. WSL is designed to provide a seamless and productive experience for developers who want to use both Windows and Linux at the same time.
-
Older but still useful: Cygwin is a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows. It does not make Windows aware of Linux tools, and applications must be built specifically for Cygwin.