Virtual Machine
A virtual machine (VM) is a computer program that simulates a computer. The VM software we’re using in this course is called VirtualBox. When you set up your virtual machine you installed Linux on the VM, making Linux the guest operating system. The operating system (OS) that’s installed directly on your physical computer is called the host OS.
We use a virtual machine in this course to ensure that everyone is working in an identical environment with the correct programs installed, but there are many other reasons programmers use VMs.
VMs isolate programming projects from everything else on a programmer’s computer. The programmer can configure the guest OS by installing programs and customizing settings without disrupting their day-to-day environment.
VMs are also used to simulate the environment that software will be deployed to. Most developers use Windows or Mac OS, but often deploy their code to servers running Linux. Using a Linux VM lets programmers run code on their target platform, without leaving the comfort of their preferred host OS.
Vagrant
Vagrant is a program that makes VMs more convenient to use. For example when you ran vagrant up Vagrant created a VM, installed a guest OS, and configured the guest OS. Vagrant did all of this automatically by following instructions in the Vagrantfile. Automating this process saves time and ensures consistent results.
Vagrant also makes it easy to edit files that are in the VM from programs installed on the host OS. We won’t use this feature in this class, but it’s very helpful in other Udacity courses and on the job.
Command Line Interface
Programmers encounter many different command line interfaces (CLIs) in their work. Any computer interface where the user enters textual commands and gets textual responses is a CLI. While CLIs vary significantly, proficiency in one will give you a head start learning another. In this class we mostly work with the Linux command line interface in a VM, but in order to access that you need to use your host OS’s command line interface. Other command line interfaces you might encounter as a developer are your browser’s tools and Python’s interactive interpreter.
A screenshot of Chrome Developer Tools’ console, which is a sort of command line interface with your browser.
Different programming languages will have different Command Line Interfaces (CLIs). A screenshot of an interactive Python session on the command line using the Python CLI. Instead of using a software program with a more standard visual user interface, many programmers often use the command line with a CLI as shown above.