This is going to be super-easy with Vagrant. [feedback]
Linux comes in many different flavors called distributions. A Linux distribution is a complete set of programs that together comprise a full operating system. [feedback]
You’re now going to install a distribution called Debian. To be more precise, you’re going to install a special version of Debian that integrates with VirtualBox very well. The special version contains extensions that allow you to easily copy files to and from a VirtualBox virtual machine. [feedback]
At the time of this writing (June 2020), the latest version of Debian is called buster and that’s the version you’re going to install. [feedback]
Vagrant knows how to configure a given virtual machine from a configuration file called the Vagrantfile. Fortunately, the Vagrantfile can be generated automatically, which is what we’re going to do 🙂 You can keep the Vagrantfile anywhere you want on your hard drive. [feedback]
To use Vagrant you need to enter the command line of your current operating system. On Windows, open the File Explorer, navigate to the directory where you want to keep the Vagrantfile (for example, the Documents directory), press Shift + right-click on the directory and click on “Open command window here” or “Open PowerShell window here”.
On MacOS, open Finder, navigate to the directory where you want to keep the Vagrantfile (for example, the Documents directory), right-click on the directory, go to Services and click on “New Terminal at Folder”. [feedback]
Once in the command line, type in the following: [feedback]
vagrant init debian/contrib-buster64
When the command finishes successfully, it should print a message that it created the Vagrantfile in your current directory. [feedback]
Want to try another distribution?
This book is written in a way that allows you to use any major Linux distribution to practice the commands from the book. We still recommend the special version of Debian described above, however, because it contains the special VirtualBox extensions. Nonetheless, two other popular distributions that have been tested with this book are: Fedora and Ubuntu. Both are good and you can give them a try. At the time of this writing, the latest version of Fedora is 32 and the latest version of Ubuntu is groovy. To install one of them, use one of the following commands instead. [feedback]
vagrant init fedora/32-cloud-base
vagrant init ubuntu/groovy64