CIS-3152 Development Environment

We will be doing most of our programming inside a Unix environment. Later in the course, when we focus more on Java rather than C, the development environment can be more flexible since Java works the same, more or less, on every platform that it supports. However, in the first part of the course using a Unix-like system is required.

The course supports three host environments: Windows, Linux, and macOS. Linux and macOS are already Unix-like systems, so setting up the development environment there is straightforward. For Windows, it is recommended that you use the Windows Subsystem for Linux (WSL). Detailed instructions for setting up all three host environments are given below.

Windows

For Windows, you will need to install the Windows Subsystem for Linux (WSL). This is a compatibility layer that allows you to run a Linux environment directly on Windows without the overhead of a separately installed virtual machine. Follow these steps:

  1. Open PowerShell as an administrator.

  2. Run the following commands:

      > wsl --install
      > wsl --set-default-version 2   # Should already be set, but just in case.
      > wsl --update                  # Update the WSL kernel.
    

    This will install WSL and the default Linux distribution (usually Ubuntu). It may not be necessary to do an immediate wsl --update, but it won't hurt. It is good practice to use wsl --update periodically to make sure you have the latest Linux kernel.

    Note that WSL will continue running even after you close all terminal windows that are using it. In general, before doing an update, it is a good idea to first run wsl --shutdown to turn off the Linux kernel. This isn't relevant when you are first setting up WSL, but it is useful to know if you try to update it later.

  3. Restart your computer.

  4. After restarting, open the installed Linux distribution from the start menu or from inside Windows Terminal.

  5. Update the Linux environment by doing:

      $ sudo apt update
      $ sudo apt upgrade
    
  6. Install essential development tools by running:

      $ sudo apt install build-essential gdb cmake git clang clangd clang-tools lldb
      $ sudo apt install manpages-dev manpages-posix-dev  # Recommended.
      $ sudo apt install valgrind strace ltrace           # Optional: Dynamic analysis tools.
      $ sudo apt install tshark                           # Text-mode network analyzer.
    

    Note that when installing tshark you will be asked if you want non-superusers to be able to capture packets. Answer "yes" (it is not the default). You will also need to add your WSL user to the wireshark group. Use the following command to do that:

      $ sudo usermod -a -G wireshark $USER
    
  7. Optionally, install a text editor like micro, neovim or emacs. You may also be interested in experimenting with Helix, a modern modal editor that is straightforward to configure for software development tasks.

    Note that if you choose to install Emacs, it will ask you about the configuration of your local (in WSL) mail server. Select "No configuration" (it is not the default).

    If you have Visual Studio Code installed in your Windows environment, you can use it to edit projects in WSL by running the command code . in your WSL environment inside the folder you would like VS Code to open. The first time you do this, VS Code will download and install a "code server" in your WSL environment that allows the Windows version of VS Code to interact with tools inside WSL (like the compilers you just installed). In this configuration VS Code will have two separate collections of extensions: one for the Windows side and another stored in WSL.

macOS

If you visualize experimenting with developing for Apple devices in the future, you might consider installing the full XCode environment from the Apple Store. However, that is overkill for this course. Instead, open a terminal and do:

  $ xcode-select --install  # Install the command line tools.

This installs the clang C Compiler (which is fine) and some other baseline tools. You might want to eventually install other tools via Homebrew, but you can wait on that until the need arises.

Linux

If you are using a native Linux environment, you can skip to step #5 in the instructions for WSL under Windows (updating your system and installing relevant packages). You may need to adjust the commands if you are using a distribution other than Ubuntu since package managers and updating software varies between distributions.


Last Revised: 2025-08-18
© Copyright 2025 by Peter Chapin <peter.chapin@vermontstate.edu>