←to practical programming

Exercise "posix"

  1. Install a POSIX system on your laptop. Preferably an Ubuntu or Debian based (just so that we all have something similar to work with).
    You have several options to choose from, depending on your hardware:
    1. Any laptop bootable from a USB-stick:
      • Install Ubuntu or Debian directly on your laptop. Many believe that Ubuntu is the easiest system to install [install Ubuntu desktop]. The latest long term support version of Ubuntu is 20.04.
    2. Chromebook:
      • Turn on the "Linux development environment" (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. Intel-based Mac:
      • 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. So, open a terminal in your MacOS and run the following command,
        /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
        
      • You can also install Ubuntu in a VirtualBox (give it ≥2 processors, ≥2G RAM, and ≥10G disk space).
    4. ARM-based Mac:
      1. 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).
      2. Install csharp-mono not from homebrew but from the mono-poject itself [mono-project.com].
    5. Microsoft Windows:
  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.
  7. Learn to create, save, and edit text files with your favourite text editor.