How to Install Debian “the Hard Way” – Text-Based Method
advanced linux cli tools debian howto linux linux installation minimal linux system setup test based installDebian is widely known as the 'Universal Operating System' because of its legendary stability and massive software repository. However, to truly master Debian, you must move beyond the automated installers and learn to deconstruct the system, building it piece by piece to ensure every service and package serves a specific purpose.
Hi all, and welcome back to MusaBase! In this article, I will guide you through installing Debian from the ground up, the true "hard way". This manual approach is for those who want absolute control over their operating system, much like the process I covered in my Arch Linux Manual Installation Guide.
While Debian is the king of stability, you might also want to explore different Linux philosophies. For a declarative approach, check out my NixOS guide, or if you prefer a modern immutable system, see my Fedora Silverblue walkthrough.
In this guide, I will teach you how to:
- Create a Debian bootable USB drive
- Handle disk partitioning and formatting manually
- Set up the live Debian environment
- Execute a clean base Debian installation
- Install and configure your preferred desktop environment
This guide will empower you with a deep understanding of your system's internals, allowing for a truly customized and minimal setup. Ready to master Debian? Let's dive in.
Prerequisites
Before proceeding with the manual installation, please ensure your hardware is ready for the Debian stable release. While this guide covers every step from downloading the ISO to creating the bootable media, your system should meet these basic requirements:
- Processor: 1 GHz minimum (Pentium 4 or newer), though a dual-core processor is recommended.
- RAM: At least 1 GB (2 GB or more is recommended for Desktop use).
- Storage: Minimum 10 GB of free space for a basic system.
- Network: A working Ethernet or Wi-Fi connection for the "netinst" process.
Ensure your BIOS/UEFI settings are accessible, as we will need to change the boot priority later. Once you're ready, let's start with the first step.
Step 1: Acquire the Correct Debian Linux ISO Image
- Go to Debian.org and click on other downloads.
- Under Download an installation image, click on complete installation image.
- Pick your download method: direct HTTP, download manager, or BitTorrent. All deliver the same ISO, so choose whichever you prefer.
- Select the ISO that matches your CPU architecture: amd64 for modern 64-bit (x86_64) systems or i386 for older 32-bit machines.
- On the final page, scroll down to the bottom and click on debian-12.11.0-amd64-netinst.iso.torrent.
When the downloading finishes, you'll have an ISO file such as:
Step 2: Create a Bootable USB Drive
2.1: Using Balena Etcher (GUI) if using Windows/Mac/Linux
- Download Balena Etcher and install it.
- Run Etcher.
- Select your debian.iso file.
- Choose the USB drive.
- Click Flash! and after a few minutes your USB will be bootable with the Debian ISO.
2.2: Using dd (CLI) if using Linux
Note: Be careful while using dd and selecting your USB drive, as dd will overwrite it.
- Plug your USB drive into your PC.
- Open a terminal and run the following command to identify your USB:
lsblk
- Look for your USB (e.g., /dev/sdb or /dev/nvme0n1). Note the name for your USB drive.
- Unmount the USB (if mounted) by running this command:
sudo umount /dev/sdX
Note: Replace X with your USB device (e.g., sdb1).
- Next, write the ISO to the USB by running this command:
sudo dd if=/mnt/sdc1/Downloads/debian.iso of=/dev/sda bs=4M status=progress oflag=sync
Note: Replace /mnt/sdc1/Downloads/debian.iso and /dev/sda with your actual path where the debian.iso is located and your USB device.
- if=: Input file (ISO path).
- of=: Output device (USB, e.g., /dev/sdb).
- bs=4M: Block size for faster writing.
- status=progress: Shows progress.
- oflag=sync: Ensures data is written properly.
- After dd finishes writing the ISO to the USB, eject your USB by running this command:
sudo eject /dev/sdX
⚠️ Warning: Using dd incorrectly can overwrite your hard disk. Double-check if= and of= before executing.
Step 3: Boot into Linux Live ISO Environment
Now that you have downloaded the Debian ISO image and have booted your USB with the image, let's install it.
3.1: Disable Secure Boot
- Reboot your PC.
- While your PC is restarting, press F9, F10, F11, F12, Del, or Esc key to go into your BIOS/UEFI.
- Look for Secure Boot and disable it under Security or Advanced Options, depending on your motherboard's firmware.
- Save & Exit.
3.2: Boot from USB
- After saving the changes made to the firmware and exiting, your PC will reboot.
- Again, press F9, F10, F11, F12, Del, or Esc (depending on your BIOS/UEFI) key to boot from USB.
- Debian's GRUB menu will load, and you will have this screen on your display:
Here we have a few options, such as:
- Graphical install
- Install
- Advanced options
- Choose the second option Install and press Enter.
Step 4: Prepare Debian Live Environment
Before partitioning your hard drive and installing Debian's base system, we need to configure language, locale, and keyboard settings.
Navigating Debian's Text-Based Environment
- Press (Up ) & (Down ) arrow keys to navigate upward or downward.
- Press (Left ) & (Right ) arrow keys to navigate left & right.
- Press Tab Key Tab to select through different options (e.g., Continue, Back, etc.).
- Press Spacebar Space to select/deselect in a list of options.
- Press Enter Enter to confirm selected choices or to continue to the next screen.
4.3: Select Keyboard Layout
- Choose your desired keyboard layout or keymap and press Enter.
- I've opted for American English.
4.4: Enter Hostname
- After setting the keyboard layout, you'll be prompted to enter a hostname.
- Type a name for your system and press Enter.
Note: Next, you'll be asked for a domain name and the root password. Leave both blank; we can configure them later once Debian is installed.
Set up Users and Passwords
- We will now create a regular user.
- Enter a username for your user and press Enter.
- On the next prompt, it will ask you for the account name of your user.
- You can type any name you want, but for simplicity I'm typing my user's name for my account name as well.
4.4.1: Set Password for User's Account
- Next, enter and re-enter the password for your user's account.
Step 5: Configure the Hard Drive & Install the Base System
In this step, we will create partitions and install the base debian system.
5.1: Partitioning & Formatting the Hard Drive
Debian offers two partitioning methods:
5.1.1: Auto Partitioning (Guided Partitioning)
In guided partitioning, we have two options:
- Use the largest continuous free space: Automatically finds free space on your drive(s) and creates partitions there.
This option will automatically reserve and use the continuous free space in a hard drive or any hard drive (if multiple storage devices are connected) to create partitions and install the base Linux system.
- Use entire disk: Erases the selected disk and dedicates it entirely to Debian.
This option will use an entire hard drive connected to your PC. It will erase any data on the selected hard drive, create partitions on the drive, and install the base Linux system.
- For simplicity, choose Use entire disk and press Enter.
- Select your target drive and press Enter.
- Choose All files in one partition (recommended for new users) and press Enter.
- Select Finish partitioning and write changes to disk and press Enter.
- Review the layout: ESP (boot partition), SWAP (swap partition), and EXT4 (root partition).
- Press Tab to choose Yes and press Enter.
5.1.2: Manual Partitioning
Manual mode lets you customize each partition's size and type, useful if you want separate /home, /usr, etc.
- Choose Manual and press Enter.
- In the manual window box, we can see our connected storage drives as sda and sdb.
- By default, Debian selects the first physically connected hard drive and has already created a generic partition table.
- I am going to select my sda drive to delete all already made partitions to create new ones.
- Choose your drive and press Enter.
- On the next prompt asking "Create a new empty partition on this device?", confirm by pressing Tab to choose Yes and press Enter.
- Now, as you can see in the following second image, we have a completely free hard drive to work with.
Creating the Boot Partition
- Select FREE SPACE and press Enter.
- Choose Create a new partition and press Enter.
- Next, remove the already assigned space figure by pressing Backspace.
- Allocate either 512 MB or 1 GB to the boot partition.
- I am allocating 1 GB for my boot partition.
- Note: Enter capital M for megabytes (MB) and capital G for gigabytes (GB) after allocating numeric digits in the prompt (e.g., 1G, 512M) and press Enter.
- On the next prompt, it will ask you for creating this partition at the Beginning or End.
- Select Beginning and press Enter.
- For simplicity, choose Name and press Enter.
- Type Boot and press Enter.
- Choose Use as: and press Enter.
- Navigate down to EFI System Partition and press Enter.
- Select Done setting up the partition and press Enter.
Creating the Swap Partition
- Select FREE SPACE and press Enter.
- Press Enter on Create a new partition.
- I am allocating 4 GB for my swap partition.
- Allocate your desired amount of space for your swap partition (e.g., 1G or 4G) and press Enter.
- Choose Beginning and press Enter.
- Next, name this partition by pressing Enter on Name:.
- Type Swap and press Enter.
- Next, select Use as: and press Enter.
- Navigate down to swap area and press Enter.
- Next, for finishing the swap partition, select Done setting up the partition and press Enter.
Creating the Root Partition
- Select FREE SPACE and press Enter.
- Press Enter on Create a new partition.
- Create a new partition using the remaining space.
- Press Enter on Name:.
- Type root and press Enter.
- We don't need to format this partition to any file system like we did for boot and swap, because by default Linux creates partitions in EXT4 format.
- Navigate down to Done setting up the partition and press Enter.
Write Changes to Disk
- When all partitions are defined, select Finish partitioning and write changes to disk and press Enter.
- Next, on the confirmation prompt, select Yes and press Enter.
5.2: Base System Installation
- Once partitioning is complete, Debian will format your partitions and automatically install the base Linux system.
Step 6: Install a Desktop Environment & Additional Packages
6.1: Configure the Package Manager
After the base system is installed, you will be prompted about installing other media. If you are installing Debian from a CD/DVD without any internet connection, then choose Yes; otherwise, skip this step by choosing No.
- Select your preferred Debian archive mirror country and press Enter (I chose United States).
- Next, pick your closest mirror server and press Enter.
- I am selecting the default deb.debian.org.
- Next, for HTTP proxy information, I am leaving this blank. But if you want to set any proxy, you can set it here.
- After configuring the package manager, Debian will start installing additional necessary packages.
- When asked whether to Send Statistics to Developers, I opted for No, but you can choose your preference.
6.2: Install Desktop Environment
- After Debian finishes configuring the package manager, it will ask you about what desktop environment you want to install.
- I am selecting KDE Plasma. Choose your preferred desktop environment using your keyboard arrow keys (Down for downward & Up for upward).
- Press Space on your desired desktop environment and press Enter to continue.
- The installer will download and install the chosen desktop packages; this may take 10-15 minutes, depending on your connection.
6.3: Reboot
- Once the desktop installation finishes, you'll see a prompt to reboot.
- Press Enter on Continue and your PC will reboot.
- Your PC will restart, and you'll be ready to log in to your new Debian system.
Step 7: Booting into Freshly Installed Debian System
- After rebooting your PC once the desktop environment is installed, you'll arrive at the GRUB bootloader menu.
- Press ENTER on Debian GNU/Linux.
- After a few seconds, you will be greeted by Debian's display manager for logging into the desktop environment installed on the Debian system.
7.1: Log into Debian's Desktop Environment
- At the login screen, enter the password you set during installation.
- After a few seconds, you will be in your Debian system with your installed desktop environment.
🎉 Congratulations! Your Debian Linux system is now up and running!
You have successfully installed Debian the "hard way," giving you a minimal foundation and total control over your disk partitioning. To keep your system secure and up to date, remember to run sudo apt update && sudo apt upgrade regularly.
If this manual walkthrough was helpful, consider subscribing to the newsletter for more deep-dive Linux tutorials.
101 out, I’ll see you in the next one! 🚀

