Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Linux/Unix System Programming with C and C++
Rating: 4.2 out of 5(560 ratings)
17,669 students

Linux/Unix System Programming with C and C++

Practical approach to Linux c-system programming for fork, thread, semaphore IPC, etc
Created byShakil khan
Last updated 3/2026
English

What you'll learn

  • Students should be able to write their own system call and utilize existing system call on Linux/Unix to create system software.
  • Students should be able to understand Unix/Linux/Mac/Windows system in greater details
  • It would also help to brush up the C coding skills of students
  • For existing developer it would help them in writing better code, free from memory leaks and other resource leaks.
  • Covers the practical aspect of system programming and gives a handson experience with System call

Course content

3 sections33 lectures5h 56m total length
  • Introduction to system programming and its concepts5:07

    Explore Linux and Unix system programming by bridging userspace and kernel space through system calls, using C and C++ to implement open, read, write, and process creation and control.

  • Alarm signal and signal handler.11:22

    Raise an alarm signal inside a process and trap it with a signal handler to observe how the five-second timer delivers the alarm. Explore how the process handles the signal, prints its number, or exits, and why a missing handler can terminate the process.

  • readdir, opendir and recursively list directory part 112:53

    Discover how to open and read directories with opendir and readdir in C, use the dirent structures, handle errors, and recursively list directory contents.

  • readdir, opendir and recursively list directory part 26:47

    Learn to implement recursive directory traversal with opendir and readdir, handling files and subdirectories, skipping . and .., and printing names while managing resources to avoid leaks.

  • readdir, opendir and recursively list directory part 33:12

    Explore readdir and opendir in Linux system programming to recursively list directories, printing both file names and full pathnames with slash separators.

  • How to read a file line by line using getline.12:12

    Learn to read a file line by line with getline, handle file pointers and double pointers, manage memory with malloc and free, and detect leaks using valgrind.

  • Read a file part 1 using read call12:54

    Master linux system programming with c and c++, read files using the read system call on our own buffer, manage file descriptors, permissions, and eof safely.

  • Read a file part 2 and errno handling14:02

    Explore reading files in Linux system programming and errno handling, translating error numbers to human readable messages and debugging permission denied errors on Linux and Mac.

  • Read a file part 3 and how to debug error in buffer14:02

    Learn how buffers affect reading a file in C and C++, including buffer sizing, null termination, and debugging techniques to balance performance with memory usage.

  • File read and write16:41

    Read from an input file and write to an output file using two file descriptors with read-only and write modes and permissions. Close descriptors and handle mismatched read/write sizes.

  • fork system call and how to create a new process7:59

    Learn how the fork system call creates a new Linux process, with parent and child contexts, and how global and local variables separate while file descriptors persist.

  • fork and pid status3:38

    Explore how fork and pid status differ between the main process and child processes, and observe their independent lifecycle, including how processes may terminate or continue.

  • Fork and defunct or zombie process6:47

    Discover how forking creates parent and child processes, and how a defunct zombie child lingers until cleanup. See how an orphaned child is affected when the parent dies.

  • Fork internals and open file descriptor inheritance demo14:06

    Demo to show that after fork parent and child can use the same file descriptor to write data.

    This video also shows a set of features of things which are inherited by child process after fork and also set of features which child process is not inherited.


  • Pthread Part 118:29

    Explore creating and running pthreads, defining a thread function, passing arguments, and observing the interaction of parent and child threads, including sleep sequencing and join behavior for parallel execution.

  • Pthread part 27:06

    Explore how pthreads execute in parallel, how context switching and time quantum shape thread execution, and how Linux, Unix, and Windows schedulers influence performance under POSIX standards.

Requirements

  • Student should be familiar with C or C++ programming language
  • Understanding or handling or PC and setup of environment and compiler would help

Description

Description:

This course provides an in-depth exploration of system programming on POSIX-compliant operating systems. You'll learn to write robust C and C++ code at the system level, gaining a clear understanding of how Linux and Unix work under the hood. These skills form the foundation on which every user-facing application is built — mastering them will set you apart as a developer.

What You'll Learn:

Process Management — Fork system calls and their variants, PID status, defunct/zombie processes, and open file descriptor inheritance.

Threads — POSIX threads (pthreads), parameter passing, thread safety using semaphores and mutexes, and building producer-consumer applications.

File I/O — Unbuffered I/O with read/write system calls, buffered I/O with fopen/fwrite/fread/fseek/ftell/rewind, reading files line by line with getline, and understanding buffered vs. unbuffered operations.

Interprocess Communication (IPC) — Pipes, fork with pipe file descriptors, and popen.

Socket Programming — Building both server and client applications from scratch.

Signal Handling — Alarm signals, kill process signals, and writing custom signal handlers.

Directory Navigation — Using readdir and opendir to recursively traverse directory structures.

Writing System Calls — How system calls work internally and how to implement your own and interface with the kernel.

Lab Setup & Virtualization: The course also walks you through setting up your development environment, including compiling and debugging C/C++ code, and covers virtualization with VirtualBox, VMware Fusion, VMware Workstation, ESXi, Hyper-V, and Windows Subsystem for Linux.

By the end of this course, you'll write clean, efficient system-level code — free of memory leaks and resource leaks — with the confidence to work across Linux, Unix, macOS, and Windows environments.

Who this course is for:

  • System developer or programmer who wants to understand the nitty gritty of OS and underlying architecture
  • Programmer who wants to know in details how the Posix API works.