Preparing a Local VM with Debian 12 Linux

What You Need for This Project

Purpose

This gives you a Debian Linux system to use on top of a Mac or Windows box.

Installing a Hypervisor

Install VMware, VirtualBox, or some other virtualization software on your machine.

I recommend the VMware Products.

Intel Processors

If you are using a Windows host machine, or an older MacOS machine, perform the steps below.

Download and Import a Linux Virtual Machine

Download the VMWare image for Debian 12 from https://www.linuxvmimages.com/images/debian-12/.

Unzip the file. A folder is created with several files, including an .ovf file.

Open VMware. From the menu bar, click File, Import. Import the .ovf file.

Launch your Linux machine.

Log in with the username debian and a password of debian

Emulated Intel Processor on Mac M1 or Later

If you are using a Mac M1 machine, you cannot use the prebuilt machine in the previous section, because you have the newer ARM processor.

Instead, do these things:

First, install UTM.

Then, go to this page: Installing Debian via the Internet.
In the "Small CDs or USB sticks", download the amd64 ISO file.

Creating an Emulated AMD64 Machine

Launch UTM and do these steps:
  • Click File, New, Emulate, Linux
  • On the Boot Image Type page, in the "Boot ISO Image" section, click the Browse button.
  • Navigate to the Debian arm64 ISO file you downloaded. Click the Continue button.
  • On the Hardware page, click Continue
  • On the Storage page, click Continue
  • On the Shared Directory page, click Continue
  • On the Summary page, enter a name of "AMD64 Linux" and click Save
  • Click the large right-arrow to launch the VM.

Installing Debian Linux

Note: this process will probably take an hour or more.
  • At the first screen, accept the default selection of "Graphical Install" and press Enter.
  • At the "Select a language" screen, accept the default selection and click the Continue button.
  • At the "Select your location" screen, accept the default selection of "United States" and click the Continue button.
  • At the "Configure the keyboard" screen, accept the default selection of "American English" and click the Continue button.
  • At the "Please enter the hostname for this system" screen, accept the default Hostname of "debian" and click the Continue button.
  • At the "Domain name" screen, leave the domain name blank and click the Continue button.
  • At the "Set up users and passwords" screen, enter a root password of P@ssw0rd in both boxes and click the Continue button.
  • At the next screen, enter a Full Name of student and click the Continue button.
  • At the next screen, accept the default name of student and click the Continue button.
  • At the next screen, enter a password of P@ssw0rd in both boxes and click the Continue button.
  • At the "Configure the clock" screen, select Pacific and click the Continue button.
  • At the "Partition disks" screen, accept the default selection of "Guided - use entire disk" and click the Continue button.
  • At the next screen, accept the default selection of "SCSI2..." and click the Continue button.
  • At the next screen, accept the default selection of "All files in one partition..." and click the Continue button.
  • At the next screen, accept the default selection of "SCSI2..." and click the Continue button.
  • At the next screen, accept the default selection of "Finish partitioning..." and click the Continue button.
  • At the next screen, select Yes and click the Continue button.
  • At the "Configure the package manager" screen, accept the default selection of "No" and click the Continue button.
  • At the next screen, accept the default selection of "United States" and click the Continue button.
  • At the next screen, accept the default selection and click the Continue button.
  • At the next screen, leave the HTTP proxy blank and click the Continue button.
  • At the "Configuring popularity-contest" screen, accept the default selection of "No" and click the Continue button.
  • At the "Software selection" screen, clear the checkmarks for "Debian desktop environment" and "GNOME". Check "SSh server". Leave "standard system utilities" checked and click the Continue button.
When the "Finish the installation" screen appears, move your mouse to the top right portion of the UTM window and click the tiny CD icon.

Point to "CD/DVD (ISO) Image..." and click Eject, as shown below.

Them click the Continue button.

Preparing sudo

When your Debian machine starts up. log in as root with the password P@ssw0rd

Then execute these commands to make "sudo" work, assuming your regular account is named "student".

apt update
apt install sudo -y
usermod -aG sudo student
reboot

Connecting via SSH

When your Debian machine starts up. log in as student with the password P@ssw0rd

Then execute this command:

ip a
Make a note of your Debian machine's IP address.

On your host Mac system, open a Terminal window and execute this command, replacing the IP address with the correct address of your Debian machine:

ssh student@192.168.64.8
Agree to the connection by typing yes

Log in with the password P@ssw0rd

Note: UTM doesn't suspend virtual machines the way VMware does. When you are done using your machine, shut it down with this command:

sudo poweroff

ARM-Based Linux

WARNING

You probably don't want this machine. For most of the projects in
COMSC-142 and CNIT 127, you need an Intel processor,
not ARM. To prepare an emulated Intel processor on Apple
Silicon, see the previous light blue box.

If your host is running on Apple Silicon, follow the steps below.

Download a Linux ISO

For Linux, download the "debian-12.8.0-arm64-netinst.iso" file from:
https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/
and install the OS from that.

Then execute these commands to make "sudo" work, assuming you are using an account named "debian"

su -
apt update
apt install sudo -y
usermod -aG sudo debian
reboot

Posted 12-3-24
Minor title update 1-4-25
Intel emulation on ARM added 1-9-25 and revised 1-10-25
Poweroff command added 1-11-25
Minor text correction 2-11-25
Link to "Getting VMware" added 3-29-25