Learning how to install Debian 12 is the first step toward running one of the most stable and trusted Linux distributions in the world. Debian 12, codename “Bookworm”, powers millions of servers, desktops, and cloud instances because of its long support cycle, huge package repository, and rock-solid reliability. Whether you are setting up a home lab, a production VPS, or a development workstation, a clean installation gives you a minimal, predictable base that you control completely.
In this guide you will install Debian 12 from scratch: downloading the official ISO, creating a bootable USB drive, partitioning the disk, and completing the first boot. By the end, you will have a working Debian system ready for our follow-up guide on initial server setup.
Prerequisites for Installing Debian 12 – How to Install Debian 12 Bookworm
Before you start, make sure you have the following:
- A computer or virtual machine with at least 2 GB of RAM (4 GB recommended for a desktop) and 20 GB of free disk space.
- A USB drive of 4 GB or larger (all data on it will be erased).
- An internet connection. The small “netinst” image downloads the remaining packages during installation.
- A backup of any important data already on the target machine.

Step 1: Download the Debian 12 ISO Image – How to Install Debian 12 Bookworm
Always download Debian from the official website to avoid tampered images. Go to the Debian download page and grab the 64-bit netinst ISO (named something like debian-12.x.0-amd64-netinst.iso). If the machine has no network access during installation, use the larger DVD image instead, which contains a full set of packages on the disc.
It is good practice to verify the checksum of the ISO before using it. On Linux or macOS, compare the output of the following command with the SHA256SUMS file published next to the ISO:
sha256sum debian-12.*-amd64-netinst.iso
If the hashes match, the image is authentic and complete.
Step 2: Create a Bootable USB Drive
On Linux, write the ISO to your USB drive with dd. Replace /dev/sdX with the correct device name for your USB stick (check with lsblk), and be careful: this command erases the target device completely.
sudo dd if=debian-12-amd64-netinst.iso of=/dev/sdX bs=4M status=progress conv=fsync
On Windows, use a graphical tool such as Rufus or balenaEtcher, select the ISO, select the USB drive, and write in “DD mode” if asked. When the process finishes, safely eject the drive.
Step 3: Boot the Installer to Install Debian 12
Insert the USB drive, reboot, and open the boot menu (commonly F12, F2, or Esc depending on the vendor). Select the USB drive. You will see the Debian installer menu:
- Graphical install – recommended for most users, with mouse support.
- Install – the classic text-mode installer, ideal for low-memory machines and serial consoles.
- Advanced options – expert install, rescue mode, and automated (preseed) installs.
Choose “Graphical install” and select your language, location, and keyboard layout when prompted. These choices also set the system locale and time zone defaults later.
Step 4: Network, Hostname, and User Accounts
The installer configures the network automatically with DHCP. If it fails, you can enter a static address manually. Next, provide:
- Hostname – a short name such as
debian-server. - Domain name – optional; leave empty for home use.
- Root password – leave it empty if you prefer the Ubuntu-style model where the first user administers the system with sudo. If you set a root password, the first user will not be added to the sudo group automatically.
- Regular user – your full name, username, and a strong password.
Step 5: Partition the Disk
Partitioning is the most important decision in the installer. For most users, “Guided – use entire disk” is the safest option. It creates a root partition for the system and a swap area. Choose “All files in one partition” unless you have a specific reason to separate /home.
For servers, consider “Guided – use entire disk and set up LVM”. LVM lets you resize volumes later without repartitioning. Advanced users can pick “Manual” to build custom layouts, for example a separate /var for log-heavy servers. Review the summary carefully, then confirm the changes and write them to disk.
Step 6: Install the Base System and Software
The installer now copies the base system. You will be asked to choose a Debian mirror; pick a country near you and use deb.debian.org for a fast, load-balanced mirror. The installer then asks which software collections to install:
- Debian desktop environment (with GNOME or another desktop) – only for workstations.
- SSH server – strongly recommended for any server; it lets you log in remotely after installation. If you are new to remote logins, read our guide on how to SSH into a Linux server.
- Standard system utilities – keep this enabled.
For a minimal server, uncheck the desktop environment and keep only “SSH server” and “standard system utilities”.
Step 7: Install the GRUB Boot Loader and Reboot
At the end, the installer offers to install the GRUB boot loader to the primary drive. Accept this — without it the new system cannot boot. On UEFI machines, GRUB is installed to the EFI System Partition automatically. Remove the USB drive when prompted and reboot.
Step 8: First Boot and Basic Verification
Log in with the user you created. Verify the release and that the system is healthy:
cat /etc/os-release
uname -r
free -h
df -h /
You should see “Debian GNU/Linux 12 (bookworm)”. Then refresh the package lists and apply any pending updates:
sudo apt update && sudo apt upgrade -y
If sudo reports that your user is not in the sudoers file, you left the root password field filled during installation. Log in as root with su - and add your user to the sudo group, or follow the detailed steps later in this series.
Troubleshooting Common Installation Problems
The installer cannot find the network card or Wi-Fi
Some hardware needs non-free firmware. Debian 12’s official images now include non-free firmware by default, which solved most of these cases. If your device still fails, connect with an Ethernet cable for the installation and fix wireless afterwards.
The machine boots back into the old system
Check the UEFI/BIOS boot order and make sure the internal drive (with the new “debian” entry) is first. Also confirm that Secure Boot is enabled or disabled consistently; Debian supports Secure Boot out of the box.
Missing sudo after installation
This happens when a root password was set. Either administer the machine as root, or add your user to the sudo group as described in our user management guide in this category.
Conclusion
You have successfully installed Debian 12 and verified the base system. The machine is now a blank, stable canvas. The natural next steps are to update packages regularly, create a swap file if your layout lacks one (see how to create swap in Linux), set the hostname properly, and harden the system before exposing it to the internet. Continue with our Debian 12 initial server setup guide to configure users, SSH, and a firewall the right way.