Determining UNIX Versions

Before you can begin adjusting shell scripts to be portable, you need to know what the different types of UNIX are and how to tell them apart. The three major types of UNIX are

  • BSD (Berkeley Software Distribution)

  • System V

  • Linux

The locations of commands and the options supported by certain commands are different among these three types of UNIX. This chapter highlights some of the major differences pertaining to commands in particular.

BSD

UNIX was first developed in the 1970s at AT&T's Bell Labs. For many years it remained restricted to AT&T and a few universities. In the early 1980s, the University of California at Berkeley acquired the source code to UNIX from AT&T Bell Labs. Throughout the 1980s and into the early ...

Get Sams Teach Yourself Shell Programming in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.