← ppnm

Exercise "POSIX"

Tasks

  1. Install a POSIX system on your device (box). Preferably Ubuntu or Debian based (just so that we all have something similar to work with). You have the following options depending on the your device:

    1. Any box bootable from a USB-drive:
      • Install a GNU/Linux system (Ubuntu, Debian, Fedora, Centos og similar) on your box. Ubuntu is (probably) the easiest system to install [install Ubuntu desktop]. The latest long term support version of Ubuntu is 22.04.
    2. Chromebook:
      • Turn on the "Linux development environment" [see https://support.google.com/chromebook/answer/9145439]. Something like
        [Settings→Advanced→Developers→Linux development environment→Turn On]
        (and follow the on-screen instructions). You can turn it off after completion of the course.
    3. Android:
    4. Microsoft Windows:
      1. Install Windows Subsystem for Linux. Here is the manual from Microsoft:
        [https://learn.microsoft.com/en-us/windows/wsl/install].
        Attention: you need to run an Administrator PowerShell not just PowerShell.
      2. You can also install Ubuntu in a VirtualBox (give it ≥2 processors, ≥2G RAM, and ≥10G disk space).
    5. Intel-based Mac:
      1. MacOS is actually (almost) a POSIX system itself (based on FreeBSD), so many students had success (though not without a few hiccups) working directly on MacOS using the Homebrew software package manager. You can install Homebrew following the instructions at Homebrew's homepage at https://brew.sh/.
      2. You can also install Ubuntu in a VirtualBox (give it ≥2 processors, ≥2G RAM, and ≥10G disk space).
    6. ARM-based Mac:
      • Install homebrew [mac.install.guide/homebrew/index.html] (read carefully the last few lines on the screen after the intallations - you need to modify your $PATH). You will probably need to install csharp-mono not from homebrew but from the mono-poject itself [mono-project.com].
  2. Learn how to start a terminal in your POSIX system. Here is a tutorial for Ubuntu.

  3. Read about the man utility. Run man man and read the description of the utility in your system.
    Hints: man usually uses less as the default pager; you quit from less by pressing the q-key.

  4. Learn the following commands (file utilities) from the GNU Core Utilities: cp, ls, mkdir, mv, rm, and the bash built-in command cd.
    Hints: type, for example, man cp in your terminal; google-search "man cp".

  5. Install bash-completion with the command "sudo apt install bash-completion". Read about the command-line completion.

  6. Install your favourite text editor. If you don't have one, install the Nano text editor with the command "sudo apt install nano". You can enable syntax highlighting for makefiles and csharp source files, see the [nano note].
  7. Learn to create, save, and edit text files with your favourite text editor.