Here's a debian minimal install guide with step by step instruction and screenshots.
No doubt that Debian and it's forks are the most popular GNU/Linux distributions. Debian gained popularity for it's rock solid and stable platform, huge software repository and powerful package management.
Though Debian is rock solid, stable, highly customizable and with large software repository, but it is not suitable for absolute beginners.
Contents
1. Which Debian version should I choose ?
There are three main Debian versions, officially called Debian Releases, namely unstable, testing and stable. Each release is assigned with a nice name too, like current Debian unstable is named sid.
So what is the difference between them ?
- Debian unstable contains the latest development version of all software. The software repository is updated everyday, one or many software packages may be broken, thus it could create a havoc.
- Debian testing release contains a somewhat matured and bug fixed software packages than testing. The software repository is updated frequently, still some packages could be broken.
- Debian stable release contains well tested and bug fixed software packages. It's primary aim is to be stable, not cutting edge. Additionally Debian stable get frequent security updates , unlike Debian unstable and testing.
So choose Debian stable for a server or production system, as they get security updates and software packages are stable.
But if you want the latest cutting edge softwares and latest kernel, use Debian testing and unstable combo, or even a Debian rolling based distro.
This is a brief outline of choosing different Debian releases, there is no rule of choosing, the final choice is up to you, use that whatever you like most.
2. Which installation media should I download ?
Another important question, there are many installation ISO files, different size, different architectures but which one will fit the best for me ? Again it depends on your choice.
Which architecture ? For a normal PC system download the amd64(64 bit) or i386(32 bit) ISO files.
Other architectures like aarch64, PowerPC are for different purpose.
Only the first CD/DVD ISO file is bootable, other CD/DVD ISO file sets are only for installing extra software.
If you want to install debian minimal system with a minimal set of software, want to save your valuable internet bandwidth and confident enough with command line interface, the Debian netinstall ISO file will be sufficient, which is around 250 MB.
3. BIOS or UEFI ?
It depends on your system and personal choice, if your PC is a latest UEFI system then you could try the UEFI and GPT combo, though I prefer to stick with the old BIOS and MBR system. Here in this tutorial we are going to use the UEFI and GPT partition table.
It is also possibble to use a UEFI system in BIOS compatibility mode, but that's irrelevant to talk about it here.
4. Preparing tools for installing the system
The first thing is to create a bootable USB drive or a burning a CD/DVD, but I'm not going into the details, here I will create the bootable USB with the dd command. This is a destructive way to create bootable USB with dd, but fairly simple.
WARNING: If you are using this method, make sure to keep backup of your data inside that USB drive, the command will delete everything inside that drive. Double check the device name before hitting the enter key.
[bash]sudo dd if=debian-testing-amd64-netinst.iso of=/dev/sdd[/bash]
Don't forget the to set the proper path of the Debian installer ISO file. The USB storage device name is /dev/sdd in this case, it may be different in your case, and type only /dev/sdd nothing else, like /dev/sdd1 , sdd2 etc. etc. Alternative you could do this in a different but non-destructive way, though some what time consuming.
Here I'm using VirtulaBox for installing the system, the only and only reason is for taking better screenshots, in fact I like repeated formatting and installing a fresh Debian.
5. Start Debian minimal install
Lets start installing the system, reboot the machine and choose the Debian bootable USB drive or DVD drive as boot media at the BIOS menu.
- The Debian installer offers two interface, a GTK+ based another text (ncurses) based. For newbies the GTK+ based interface is recommended, just Press the continue button after each sucess full step. Choose the Graphical Install menu for the GTK+ based installer.
- Then the first step is to select the language, select the language of your choice at this step.
- Then select your location, this step is pretty self documented, read the help text at top.
- Then select the keybmap, i.e. the keyboard layout. this step is important, choose the keymap carefully, differnet keyboard layout will make your typing damn tough, though it could be changed later.
- The next steps are somewhat automatic, the installer will gather some necessary components for installing the base system, now set the hostname of your system, this is the name of your PC (not the brand name like Dell, Acer), the default is debian, you could change it, I'm naming it vbox. This could be changed later too.
- Next set the domain name, leave it blank for a normal desktop system. This domain name plays a significant role if you are using this machine as a server, I'm naming it vbox again.
- Now set the root password, It is always good to set a long difficult password.
- Now setup the username and password for the normal user, i.e. may be your name, I'm setting it user1 for example, again choose a good password for the user account.
- The next few steps are automated, wait and let the installer finish the task automatically.
- The disk partitioning step, this is very important step, and do it with care, as a new install, I'm formating the whole disk, select the Manual partitioning.
- Partitioning the hard drive, at this step you have to determine how much space to allocate to which partition. Look at the example disk partition for a 2 GB Virtual Hard drive. There are two free space of about 1 MB at the start and end of the disk, but that's fine. Now select the finish partitioning and write changes to disk to finish the partitioning.
- The next step is also somewhat automatic, this will install the basic system utilities. Now choose if you want to use a network mirror or not, I selected NO , but select yes if you have a fast and cheap internet connection.
- Now select which components you want to install, choose only standard system utilities if you want a minimal install, or the XFCE if you want a full blown XFCE desktop.
- Now give some time to let the installer finish the installation process. You may be or may not be asked to select the device to install grub, if you are not an expert, choose only /dev/sda nothing else.
- Now the installation is complete, press the continue button to reboot the machine , and login to the new system with your username and password.
So what to do next ?
That's an absolute minimal debian install, which takes just around 900MB of disk space, there is no GUI installed. Lets make the minimal system somewhat more usable.
The firs step is to add the repository URLs and update the software repository, assuming you know how to connect this minimal system to the internet.
Update the software repository
su - # type the root user password echo 'deb http://ftp.us.debian.org/debian/ stretch main contrib non-free' >> /etc//apt/sources.list apt-get update
Install and configure sudo
apt-get install sudo usermod -aG sudo user_name
Don't forget to replace the user_name with your system user name. Now install necessary device firmware packages
sudo apt-get install firmware-linux firmware-linux-free firmware-linux-nonfree
Install networking support with Network Manager,
apt-get install network-manager
Conclusion
So that's it, step by step debian installation guide, I hope this guide will help you. If you have any problem, question or suggestion please let us know, just leave leave a comment. And hey, please share this guide with your friends.
steam says
Hi, I did all this on a laptop over wifi which worked like charm during install. I chose the non-graphical install.
But after the first reboot I cannot get an internetconnection over wifi nor over ethernet. What can i do?
Abraxas says
Had the same question
https://revcode.wordpress.com/2012/04/18/connecting-debian-to-the-internet-on-the-command-line-ethernet/
Folke says
My intention is to move all tasks to virtual machines, one for email, one for surfing, one for online purchase, one for libre office etc.
What would your recommendation for the minimal configuration of the physical machine?
I am able to install Debian and work with the console (it reminds a bit of old MS-DOS times). I was even able to install Raspian on the Pi as a headless server and running a web server with nginx.
Now I want set up my physical machine to meet my needs and not install anything more than is absolutely necessary. Unfortuantely I am not deeply familiar with the OS and do not know what is essential.
Arnab Satapathi says
If all four of the virtual machines are running at the same time, then it needs a bit powerful hardware.
So, I'll recommend-
1. Intel i7 quad core CPU, preferabbly the K series. Even you could use the older i7 2600k series, with a compaitable motherboard.
2. At least 8 GB of RAM, 16 GB better. Assuming 1.5 GB to 2 GB per virtual machine.
3. A Samsung 860 EVO or 860 Pro SSD, 250GB.
Dedicated Graphics card is not necessary. And a large monitor is better.
For lightweight tasks, like mailing, browsing and online shopping, I'll recommend the Chromium OS x86 version, just ready to use out of the box. Of course, if you trust Google.
Folke says
The hardware is not the problem.
i7-4771, 16 GB RamSamsung SSD 500GB
Most of the time I run max. 2 VM at the same time. I want an operating system on my physical computer with the lowest possible footprint, the less is running on this computer, more is available for VM.
I was thinking of Debian. Do I need a Desktop environment only to run for example VirtualBox?
What is essential to install for running Virtualbox only?
Arnab Satapathi says
VirtualBox needs the X11 stack, a desktop environment or window manager, and some GTK+ or Qt libraries. However GTK+ libraries are a bit more trimmed.
You could use openbox or i3, both of them are very lightweight.
And yes, Debian is also my choice.
sintax says
@Folke, you should look into Qubes OS if you are trying to 'compartmentalize' every task, as mundane as it is, Qubes would be a better solution than running entire virtual machines.. even docker containers would be a better option, or you could even use one of the BSD's since they're fairly tiny with minimal installs and jails are native to the OS.
Gaurav says
Thank you very much
U|3|-Rpr01337h4x0r says
Meh, it's not the most basic usable installation. Actually you can remove a lot of crap.
Arnab Satapathi says
Yeah, perform a debian minimal install from a netinstall ISO, and select packages one by one, manually.
ZHouYL says
Thanks a lot to your post to guild for installing Debian, but, i am new learner, can you tell me how I connect this minimal system to the internet?
Arnab says
Hi, as a new learner, NetworkManager is good for you, try these links bellow,
https://wiki.debian.org/NetworkManager
https://wiki.debian.org/WiFi/HowToUse
https://wiki.debian.org/NetworkConfiguration
https://www.debian.org/doc/manuals/debian-reference/ch05.en.html
Johnnie says
Hi, type : "sudo ip", then note the name of the interface (such as eth0 or enp*s*) where there is written something like "ethern".
Then, type "sudo dhclient name-of-the-interface-you-note-down"
Remember you will have to do this at each reboot, unless you do : "sudo nano /etc/network/interfaces" and you add 2 lines :
"auto name-of-the-interface-you-note-down
iface name-of-the-interface-you-note-down inet dhcp"
PS : of course don't use the quotation marks !
N900 says
"So what is the difference between them ?" mentions Debian testing twice. One should be Debian unstable.
Arnab says
Thank you very much for spotting the mistake, now it's fixed. Again thank you for your valuable comment.
MRINMOY CHAND says
Great article sir.
Arnab says
Thank you Mrinmay, keep visiting.