Unix and C Development Environments


MacOS

Install Xcode: https://www.youtube.com/watch?v=1E_kBSka_ec


Windows Subsystem for Linux (WSL) - recommended for Windows systems

WSL Installation Guide - Ubuntu 20.04; update to WSL 2 is not necessary

Ubuntu WSL reference

For an older more detailed tutorial see the first 8.5 minutes of https://www.youtube.com/watch?v=Cvrqmq9A3tA (summary). If you have more than one version of Ubuntu installed see WSL commands and launch configurations and example.

Post-install:

  sudo apt update
  sudo apt upgrade -y
  sudo apt install -y gcc g++ make gdb zip python

  mkdir /mnt/c/os
  cd; echo "cd /mnt/c/os" >> .profile
The cd in .profile will go to /mnt/c/os automatically on startup.
Files there are shared -- in MS/Win edit using WordPad, not NotePad; in WSL edit using nano.


Test Program

In a terminal window, in your os subdirectory:
  $ wget http://fog.misty.com/perry/os/examples/examples.zip
  [or use curl -O if wget is not available]
  ...
  $ unzip examples.zip
  ...
  $ rm examples.zip
  $ cd examples/intro
  $ make
  gcc -Wall -o args args.c
  $ ./args
  0: ./args
  n = 0, d = 0
  $ ./args 123 456.789
  0: ./args
  1: 123
  2: 456.789
  n = 123, d = 456.789
  $


Web-based Environments


Other Notes

From Sarvesh Kulkarni and Kyle Juretus for C++ and Networks courses:
  VirtualBox_Ubuntu_Installation.pdf & Issues and Solutions
  ubuntu20.04_post-installation_config_instructions.pdf


Old Notes

Ubuntu installation in VirtualBox; Disk defragment and partition and problems