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 install
Debian 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.1: Select Language
4.2: Select Location
4.3: Select Keyboard Layout
Expand
- Choose your desired keyboard layout or keymap and press Enter.
- I've opted for American English.
4.4: Set Hostname
Expand
- 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
Expand
- 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.
4.5: Configure the Clock
Step 5: Configure the Hard Drive and Install the Base System
In this step, we will create partitions and install the base debian system.
5.1: Partitioning and Formatting the Hard Drive
Debian offers two partitioning methods:
5.1.1: Auto Partitioning (Guided Partitioning)
Expand
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
Expand
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.
Frequently Asked Questions: Debian "Hard Way" Installation
What is the "hard way" of installing Debian and why would I choose it?
The "hard way" refers to the manual, text‑based installation process instead of the graphical installer. It gives you complete control over every aspect of the installation, from disk partitioning to package selection. This method is ideal for users who want a deeper understanding of their system, need a highly customized setup, or prefer a minimal base without unnecessary bloat. It follows the philosophy of distributions like Arch Linux, where you build your system piece by piece.
What are the minimum system requirements for Debian?
For a standard installation with a desktop environment, you should have:
- Processor: 1 GHz minimum (Pentium 4 or newer), dual‑core recommended.
- RAM: At least 1 GB (2 GB or more is recommended for a desktop).
- Storage: Minimum 10 GB of free space for a basic system; 20 GB+ for a comfortable desktop setup.
- Network: A working Ethernet or Wi‑Fi connection for the netinst installer.
How do I download the correct Debian ISO for a manual installation?
Go to Debian.org/distrib, click on other downloads, then under complete installation image choose your preferred download method (HTTP, BitTorrent). Select the ISO matching your CPU architecture: amd64 for modern 64‑bit systems or i386 for older 32‑bit machines. The file will be named something like debian-12.11.0-amd64-netinst.iso.
How do I create a bootable USB drive for Debian?
You can use Balena Etcher (GUI) on Windows, Mac, or Linux: select the ISO, choose your USB drive, and click Flash. Alternatively, use the dd command on Linux:
sudo dd if=/path/to/debian.iso of=/dev/sdX bs=4M status=progress oflag=sync
Replace /dev/sdX with your USB device (check with lsblk). Be extremely careful to avoid overwriting your hard disk.
Do I need to disable Secure Boot before installing Debian?
Yes, you must disable Secure Boot in your UEFI/BIOS settings. Debian’s bootloader is not signed with Microsoft’s keys, so UEFI firmware with Secure Boot enabled will block it from starting. Enter your BIOS settings (usually by pressing F9, F10, F11, F12, DEL, or ESC during boot), disable Secure Boot, save, and exit.
How do I navigate the text‑based Debian installer?
Navigation is simple:
- Use Up and Down arrow keys to move through options.
- Use Left and Right arrow keys to navigate bottom buttons (like Continue, Back).
- Press Tab to cycle between selectable elements.
- Press Space to select/deselect items in a list.
- Press Enter to confirm a choice or proceed.
What language, location, and keyboard layout should I choose?
Choose your preferred language (e.g., English), your country/region (e.g., United States), and your keyboard layout (e.g., American English). These settings determine the system language, timezone, and key mapping. You can always change them later.
How do I set the hostname and create a user?
Enter a name for your system (e.g., debian). You can leave the domain name blank. Then create a regular user: enter a username (e.g., john), optionally a full name, and set a strong password for that user. The root password is not set during this process; you will use sudo for administrative tasks after installation.
What partitioning methods does the Debian installer offer?
The installer provides two main methods:
- Guided (Auto) Partitioning: The installer automatically partitions the disk. Options include Use entire disk (erases the whole disk) or Use the largest continuous free space (if you have pre‑allocated space).
- Manual Partitioning: You create, resize, and format partitions yourself, giving you full control over layout, sizes, and filesystem types.
How do I manually partition my disk for Debian (UEFI)?
In the manual partitioning screen, you need at least three partitions:
- Boot/EFI partition: Select free space, create a new partition of 1 GB (or 512 MB), use it as EFI System Partition, and give it a name like Boot.
- Swap partition: Create another partition of 4 GB (adjust as needed), use it as swap area, and name it Swap.
- Root partition: Use the remaining free space, create a partition, use it as Ext4 with mount point /, and name it root.
After creating all partitions, select Finish partitioning and write changes to disk and confirm.
What happens after partitioning?
The installer formats the partitions and installs the base Debian system. This includes the kernel, core utilities, and essential packages. The process may take several minutes and you will see progress bars for formatting and package installation.
How do I configure the package manager (APT) during installation?
After the base system is installed, you will be prompted to configure APT. If you are online, choose No when asked about scanning another CD/DVD. Then select your country (e.g., United States) and a nearby mirror (e.g., deb.debian.org). You can leave the HTTP proxy blank. APT will then download package lists and update itself.
How do I install a desktop environment during the text‑based install?
After configuring APT, the installer presents a list of software choices. Navigate to KDE Plasma, GNOME, XFCE, or your preferred desktop, press Space to select it, then press Enter. The installer will download and install the chosen desktop packages (this may take 10–15 minutes). You can also select additional options like standard system utilities.
What should I do after the installation is complete?
When the installation finishes, you will be prompted to reboot. Remove the installation media and press Enter to restart. After reboot, you will see the GRUB boot menu; select Debian GNU/Linux. The display manager (login screen) will appear, where you enter the password for the user you created. You will then be logged into your new Debian desktop environment.
What are the most common mistakes when installing Debian manually?
- Not disabling Secure Boot, preventing boot from the USB.
- Choosing the wrong keyboard layout, making password entry confusing.
- Incorrect partitioning (e.g., forgetting to set the EFI partition type or not assigning the root mount point).
- Not selecting a desktop environment, ending up with only a command‑line system.
- Skipping the mirror configuration, which leaves APT without sources.
- Not noting the username and password, leading to login issues after reboot.
🎉 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! 🚀
