System Programming in Linux

System Programming in Linux

A Hands-On Introduction
by Stewart N. Weiss
August 2025, 1,048 pp.
ISBN-13: 
9781718503564
Use coupon code PREORDER to get 25% off!

Download Chapter 9: Timers and Sleep Functions

Look Inside!

System Programming in Linux back cover
System Programming in Linux pages 196-197System Programming in Linux pages 546-547System Programming in Linux pages 716-717

Most programmers never learn how Linux really works. Why? Because system programming is rarely taught, and the tools can be intimidating without the right guidance. As a result, many developers stick to high-level languages and frameworks—writing code that runs on Linux without understanding how it interacts with Linux.

In today’s world, that’s not enough to stand out. Especially as more companies turn to AI to write their software, the question becomes: How do you stay relevant in an AI-driven world? You learn how things really work.

If you’ve ever wondered how processes are created, how memory and files are managed, or how programs communicate in a Unix environment, System Programming in Linux will make it all make sense.

This is a hands-on guide to writing software that interfaces directly with the Linux operating system. You’ll go beyond shell commands and abstractions to understand what the kernel is doing—and how to leverage it through your own code. Rather than telling you how to solve each problem, Professor Stewart N. Weiss guides you through the process of discovering the solution yourself.

Start with the core concepts of Unix and Linux, then work your way up to advanced topics like process control, signals, interprocess communication, threading, and non-blocking I/O. Each chapter includes conceptual diagrams, annotated source code, and practical projects to help you immediately apply what you’ve learned.

You’ll explore topics such as:

  • The structure of Unix and Linux operating systems—and why it matters
  • Using system calls to create and manage processes
  • The mechanics of signals, timers, and interprocess communication
  • Using synchronization tools to write multithreaded programs
  • Interacting with filesystems, devices, and terminals
  • Building text-based user interfaces using ncurses
  • Developing programs that are robust, efficient, and portable

At Hunter College, Professor Weiss built the course this book is based on, and he has helped thousands of students go from confusion to confidence in his over 40 years of teaching programming. His clear, conversational style; technical depth; and focus on real-world application make this one of the most approachable and powerful system programming books available.

As Linux continues to dominate development, server, and embedded environments, understanding the system behind your software isn’t just helpful; it’s essential.

Whether you’re a student, developer, or sysadmin, this book gives you the tools to work directly with Linux and the insight to understand what’s really happening under the hood.

Author Bio 

Stewart Weiss was a professor in the computer science department of Hunter College for 38 years and was also on the faculty of the Graduate Center of the City University of New York. He developed courses in Unix system programming, parallel computing, software testing, and open source software development. Weiss holds a PhD in computer science from the Courant Institute of Mathematical Science of New York University. He has been working with Unix and C since 1983 and is passionate about sharing his knowledge of Unix and Linux systems.

Table of contents 

Acknowledgments
Preface
Introduction 

Chapter 1: Core Concepts
Chapter 2: Fundamentals of System Programming
Chapter 3: Times, Dates, and Locales
Chapter 4: Basic Concepts of File I/O
Chapter 5: File I/O and Login Accounting
Chapter 6: Overview of Filesystems and Files
Chapter 7: The Directory Hierarchy
Chapter 8: Introduction to Signals
Chapter 9: Timers and Sleep Functions
Chapter 10: Process Fundamentals
Chapter 11: Process Creation and Termination
Chapter 12: Introduction to Interprocess Communication
Chapter 13: Pipes and FIFOs
Chapter 14: Client-Server Applications and Daemons
Chapter 15: Introduction to Threads
Chapter 16: Thread Synchronizations
Chapter 17: Alternative Methods of I/O
Chapter 18: Terminals and Terminal I/O
Chapter 19: Interactive Programming and the NCurses Library

Appendix A: Creating Libraries
Appendix B:
 Unicode and UTF-8
Appendix C: Date and Time Format Specifiers

Bibliography

The chapters in red are included in this Early Access PDF.

View the detailed Table of Contents
View the Index

Extra Stuff 

A repository of code and errata for this title can be found at the book's GitHub page.

A tutorial on using the make utility in Linux is available from the author's GitHub.