After installing Debian, people often want to do a few extra setup tasks which I’ll discuss in this article. I also provide an easy way for you to do them automatically.
What I Want You To Know About Debian
Debian is a rock-solid distro of choice for many Linux users, both new and skilled alike. It has a reputation of not breaking very often, and because of that, it’s used as a base for many other Linux distributions, such as Ubuntu, Linux Mint Debian Edition, Kali Linux, Devuan, Deepin, Raspberry Pi OS, BunsenLabs Linux, Qubes OS, Tails, SteamOS, and many others.
It’s one of the more mature Linux distros, with its first public release (version 0.01) on 1993-09-15, and its first stable release (version 1.1), named “buzz”, on 1996-06-17.
Many people know the core Debian tools quite well, although often because they are using a Debian derivative such as Ubuntu or Linux Mint (which is in fact an Ubuntu derivative). The popularity of these derived distros is mostly due to their creators’ small amount of effort making fancy-looking desktop themes, and their large marketing budgets. These distros are not much different than Debian itself, and they all have mostly the same free software available to install in their official online package repositories as Debian.
Other notable differences include the decision of which of those packages should be installed by default, and which Debian “update stream” they choose to base themselves off of. Debian has three main update streams, each with their own software repositories, which are known as “Stable”, “Testing”, and “Unstable (a.k.a. Sid)”. Stable is regularly audited by security researcher volunteers and other software experts, and any safety or stability issues found in any of the packages available in this update stream are promptly fixed.
For anyone who doesn’t need that level of safety and stability, it’s usually fine to use the Testing update stream. It can be beneficial in some cases, for example, if you want newer Windows games to work properly with Wine
or Proton
, sometimes you’ll need the newer Xorg
or GPU drivers
from the Testing stream for those games to run properly.
Criticisms of Debian
People who initially came to Linux through some Debian derivative distro like Ubuntu often claim that Debian is hard to use, or that Debian doesn’t work out-of-the-box, and so it’s not suitable for Linux beginners they say, but these claims are neither accurate, nor true at all.
Over the years I have encountered many more Ubuntu and Linux Mint releases which shipped with broken installers, and other bugs which needed some weird workarounds. There were very few similar types of problems on any Debian releases. It was in fact Debian which was usually working properly out-of-the-box, and some of its derived distros that weren’t, and this is no surprise, because a derived distro will almost always contain any bugs present in the parent distro, and will usually also contain extra bugs introduced when its creators make additional modifications. You might imagine that the people who are depending on some parent distro such as Debian for their own distro to work at all, might probably not have as much expertise or rigour as the people who make the distro which theirs depends on.
It’s an indisputable fact that Debian is almost always working properly out-of-the-box, and is hardly any different than these derived distros. There are simply not enough differences to cause Debian to be any harder to install or use than any of the other derived distros. People are just repeating this nonsense in most cases because they never tried Debian before, and/or they saw some Ubuntu or Linux Mint advertisements which caused them to prefer to use Ubuntu or some other derived distro.
Anyway, to get to the real purpose of this article: After installing Debian, many people want to make a few changes to the default configuration, to make it behave in a way that’s more similar to the default configuration of some of the Debian derivative distros, and these are usually the same small set of changes that almost everyone wants to do, so I’ll go over them here, and you can decide if you really want to make these changes or not the next time you install Debian. Maybe this list will be a useful reference to remind you of some of the changes you’ll be wanting to make, that you might not always remember once you finish the Debian install process.
Personally, I do all of the steps below after I install Debian for myself, and many of my customers have asked for most of these customizations without me suggesting them first.
Common Debian Post-Install Setup Steps
- Add your user account to the
sudo
group, so you can run commands asroot
by typing the wordsudo
before them. During the Debian install process, you are currently given the option to set aroot
password or not. If you choose to set aroot
password, your regular user account will not be givensudo
permissions by default. All of the following steps assume you have a root password set up already, and they won’t work if you don’t, so if you didn’t set one during the install process, you should do that first, using the commandsudo passwd
. To enablesudo
permission for your regular user account, run the following command in a terminal:su - -c 'gpasswd -a '$USER' sudo'
- Enable the official Debian
contrib
andnon-free
apt repositories, so you have access to more downloadable software:su - -c 'cat /etc/apt/sources.list | grep "contrib non-free" || \ sed -i "s/main/main contrib non-free/g" /etc/apt/sources.list'
- If on an
x86_64
system, enable thei386
architecture so that if you want to installwine
later, it might work properly for more things:su - -c 'uname -a | grep "x86_64"; \ if [ $? -eq 0 ]; then dpkg --add-architecture i386; fi'
- Update the system, including any available
dist-upgrade
packages in the current Debian release. Also, install thelsb-release
package so we can detect some things about the Linux distro to allow some future setup steps to be more automatic:su - -c 'apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && \ apt-get autoremove -y && apt-get install -y lsb-release'
- Install all available
free
andnon-free
device firmware:su - -c 'apt-get install -y firmware-linux firmware-misc-nonfree'
- Enable the official
backports
repository, so you can install some newer software when you want to by using the command:
sudo apt-get -t $(lsb_release -cs)-backports install <package name>
su - -c 'mkdir -p /etc/apt/sources.list.d && \ echo -e "deb http://deb.debian.org/debian $(lsb_release -cs)-backports main contrib non-free\ndeb-src http://deb.debian.org/debian $(lsb_release -cs)-backports main contrib non-free\n" | \ tee /etc/apt/sources.list.d/debian-backports.list && \ apt-get update'
- Install the correct nvidia video card driver and related packages if you have an nvidia GPU. This will install the latest version of the driver and the latest Linux kernel from the official
backports
apt repository, for best GPU compatibility:su - -c 'export DEBIAN_BACKPORTS_OPTS="-t $(lsb_release -cs)-backports"; \ apt-get ${DEBIAN_BACKPORTS_OPTS} install -y nvidia-detect; \ export NVIDIA_DRIVER_PACKAGE=`nvidia-detect 2>/dev/null | tail -n 2 | head -n 1 | xargs`; \ echo "$NVIDIA_DRIVER_PACKAGE" | grep nvidia-; \ if [ $? -eq 0 ]; then \ export DEBIAN_ARCH_NAME=`uname -r | rev | cut -d- -f1 | rev`; \ export DEBIAN_ARCH_NAME_FALLBACK=`uname -r | rev | cut -d- -f1,2 | rev`; \ apt-get ${DEBIAN_BACKPORTS_OPTS} install -y linux-image-${DEBIAN_ARCH_NAME} linux-headers-${DEBIAN_ARCH_NAME} || \ apt-get ${DEBIAN_BACKPORTS_OPTS} install -y linux-image-${DEBIAN_ARCH_NAME_FALLBACK} linux-headers-${DEBIAN_ARCH_NAME_FALLBACK}; \ apt-get ${DEBIAN_BACKPORTS_OPTS} install -y firmware-linux firmware-misc-nonfree; \ apt-get ${DEBIAN_BACKPORTS_OPTS} install -y build-essential ${NVIDIA_DRIVER_PACKAGE} && \ apt-get autoremove -y; \ else \ echo "No nvidia GPU was detected."; \ fi'
- After running that final series of commands, you need to reboot unless it outputs the message “No nvidia GPU was detected.”. If you see that message then you only need to log out and log back in to activate your new
sudo
permissions.
Automatic Method
I wanted to go over each of those steps one-by-one so you can take note of them. However, I’ve made a script which does all of the above steps automatically, that you can run by issuing a bash
one-liner in the terminal. If you’d rather do the above steps all at once, simply enter this in your terminal after installing Debian, and everything should happen automatically:
su - -c 'apt-get update && apt-get install -y wget' && \ bash <(wget -qO - https://bit.ly/debian-post-install)
Full details of the script, and the script itself can be viewed in my GitLab
repository here:
https://gitlab.com/defcronyke/debian-post-install
The above command runs the script directly from that repository, so you can always check the above link first before running it, if you want to verify that it will do what you expect. The script might change over time to add more features or to fix any issues if I become aware of any, so it might be wise to take a look at it each time before you run it. I take no legal responsibility whatsoever if my script does anything to your system that you’re not satisfied with, or if it harms your system in any way. I’m very sorry if it does anything undesirable. If that happens, please consider filing a bug report at the GitLab
repository link above, and I’ll do my best to fix any problems with the script right away.
Those are all the common changes I’m aware of that the majority of Debian users usually want to make after installing a new Debian system. If you can think of any other changes I’m missing here, as long as you think they are fairly minimal things that most Debian users usually like to do, feel free to mention them in the comments below and I’ll consider adding them to this list.
Extra Tips For Having The Best Debian Experience
- I always recommend using the
Xfce
desktop environment on desktop Linux installations for the least chance of problems. It’s not too heavy, but you can add lots of extras to it as you prefer. It’s fairly customizable and stable. Debian has this desktop environment available in its official releases, although sometimes it’s not the default. You can choose it during the install procedure, or by installing with the correct install image. - The Debian website publishes an unofficial Live CD installer version which includes all the available
non-free
device firmware which isn’t present in their official installation images. To avoid a rare potential situation where some of your hardware isn’t working properly during or immediately after Debian installation, I suggest that you consider using this unofficial installation image instead of their official one. It’s a bit hard to find by navigating their website, so I’m linking to it here for convenience:
https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid/ - You should only use the above images if you’re okay with installing and using
non-free
device firmware which cannot be audited properly for safety and security issues, since the firmware source code isn’t available from the manufacturers of the associated devices. If you’d rather not be doing that, you can usually use their official installation images without any problems, which you can find here:
https://www.debian.org/distrib/
Disclosure: Jeremy is an online computer store owner whose store is listed as a “Debian pre-installed vendor” on https://debian.org, but is otherwise not currently affiliated with the Debian Linux distribution in any way. Still, because of this there may be some bias in favour of Debian in the writing above. The people in charge of Debian don’t necessarily condone or personally hold any of the views expressed above, they are only the author’s personal views, albeit somewhat influenced by several years spent supporting various free Linux distributions for his customers at his job.
Things Most People Do After Installing Debian by Jeremy Carter <jeremy@jeremycarter.ca> is licensed under the terms of the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International license.
14 thoughts on “Things Most People Do After Installing Debian”
Jeremy,
A good job done for — mainly — intermediates. I wish I had had this resource when I began my glorious Linux life. Still good tips for me as well, although I’m happy with my Debian Mate, so the worst is long since over.
Possibly my blurb: I prefer shell only — well, that and FireFox browsers. I have really stream-lined my system, and should really make my bash-scripting available to others… I get bogged down with the details :-/ I have no commercial pressures, but have clocked up many version upgrades.
All the best.
Thanks David, I’m glad you find some value in this piece. I’m hoping it’s also useful to Linux beginners, that they can read my opinionated rant and then just copy one line of commands into a terminal and be good to go with a nicely set up new Debian install.
I’ve been installing and supporting Debian for people who are completely new to Linux for quite a few years now, and most of them have been satisfied, and as far as I know most haven’t been feeling the need to do any distro-hopping afterwards. Some of them broke it a few times and I was able to easily guide them on how to reinstall it themselves over the phone or over email, so I think it’s a pretty easy distro, even for newcomers.
Some of the distros I tried when I was initially learning to use Linux around year 2000 were not nearly as reasonable to figure out, and at that time, Debian was also a bit harder to get a DE running on, but I think at least ever since Debian “Woody” version it’s been a very easy distro to use for beginners. I mostly just use it for servers these days, and for my main desktop I have been preferring Arch Linux for a while now.
You should definitely share some of your custom solutions if you get a chance to package them up nicely at some point. A bit of time spent polishing these types of solutions up can go a long way with helping the Linux community, and there’s still lots of gaps waiting to be filled and things which can be streamlined, which I’m sure many hundreds of older Linux users have solved over and over again, and then just never bothered to share their nice solutions.
Thanks for reading, and thanks for your nice comment!
The first time I installed Debian was more than a few years ago,I did it twice and no desktop,I then went to the library and got a Debian book out which told me what was wrong,I just needed to install a desktop of my choice and then it worked ! Debian is much easier now and I heartily endorse your recommendation to chose an iso from ” unofficial source with ” non-free ” included and the it is as easy to install and use as Ubuntu or Linux Mint.Nothing is for nothing you have to have real determination and a brain and effort and even some one with no IT background and grey hair can enjoy the wonderful Debian experience,A very happy Debian 11 user !
Great work Jeremy!
You could insert in your script a couple of lines that when you launch the script, check on github if there is an updated version and if so if you want to download it.
Thanks Antonio 🙂
If it’s going to check with GitHub (well, GitLab in this case) to see if there’s an update anyway, it may as well just be pulled fresh from GitLab each time you run it, the way it is if you run it with the command mentioned above. This way the script itself doesn’t have to be concerned with its own versioning, but if you run it with the short command above, it’s already going to be updated to the latest version each time anyway. The only drawback is it’s not going to be telling you if it was updated or not, but I don’t think that’s too important, since in many cases people would be using this script only on a freshly installed OS.
Anyway thanks for your nice comment, and I am open to hearing more arguments for what you propose if you want to push harder for it. But I probably won’t do it.
Hi, in the end debian and arch are the most best choices for an OS
Good article
Which explains what needs to be done. I however when I installed debian did create a admin password. Which can confuse new users. One thing to keep in mind is debian is not the lastest and greatest OS. When its released the kernel is older than ubuntu current release.
I have used debian in the past on a laptop. It was a learning experience when I had no wifi connection. This was a thinkpad t420. Debian is not a bad operating system. Its just basic and it needs applications in stalled that a new user will not know or understand unless they themselves research the install process.
There is the printers setup gui that also would need to be installed if not ready but I assume its not.
For thoses that are really new debian forums are not pleasant experience. They do not respect new users be warned. Users will need to use the command line if they use linux. There is no way around that. I have bad typing skills due to a disability so I have to have a text document of commands I can copy and paste.
Things Most People Do After Installing Debian
1. Visit the Debian forum
2. Install Mint or Ubuntu!
@Jeremy Carter: Thank you for your article. I consider this is big demand for wise hints how to prepare Linux to get best user experience from first boot after installation. I asume your intention is good and clear form moral point of view. But reality is different from some your asumptions which I found somewhat naive. I have two objections.
I was Debian 9/10 user for 1,5 year (06.2019-12.2020, 8h per day) and my experience is bad. Both from stability and usability point of view. Stability: I use NVidia Geforce 710GT card and on initial Debian 10 release NVidia driver stability was perfect (Noveau, which was default, hangs so many times that my 500GB SSD drive were completely filed with over 250GB Noveau hang logs). But with advent of some 10.x release NVidia driver starts hangs randomly. Second thing: you claim that “debian packages don’t change very often”. This is true, but consequences are horible: old bug-fixex are not back ported to debian packages, and old libraries cause some new packages does not work with Debian. Suprise? Well known issue had Qt installer and Debian 10.x. qt.io promise solve this issue in the future. But I have no time: I switch to Kubuntu. The same issues are with newer C++ sources and old Debian GNU g++/Clang compilers. This was reason to switch from Debian to Ubuntu for one of my coleagues. To sum up this part of my comment: In my work Debian is used only as host for Docker containers where each of them holds entirely Linux installation (AFAIK).
Second issue of your article is that you are linux close packages enthusiast, but it is completely unnessesary from usage point of view. I can’t see any reasons for use close packages except graphic drivers. The only sensible reason for such packages is that they are goverment agencies backdors. So: Please don’t give such advice without mention about security.
government agency backdoor is not a sensible conclusion from closed stable packages. Going into a stable package is more secure than the non-free or ubuntu. The author is thinking from a systems admin point of view. Nobody wants to spend a week rolling out new software just to have it create additional problems. The reality is, if there is an exploit, then it has not been identified or discovered in stable, what can you do? Discovery it yourself?… If there is an exploit and it has been discovered or identified, it is addressed real-time in the open packages.
Debian is stable. It has workstation in mind. Thats the deb guarantee. If you want bleeding edge or rolling, you gotta choose that option or you gotta choose someone else. If you want a rolling debian based package i recommend kali-linux rolling.
DAMN. nice coverage. solid and informative piece. This saved me hours of research and sifting through nonsense.
Thank you Jeremy Carter. Debian 11 is now up and running smooth as ever on an Alienware Aurora R7 dual booted with windows 10 pro.
Very good account ,I wish I had had something like this years ago ,it took me a long time to learn most of this,i.e. no IT background and grey hair !
no further comment just want newsletter
Varios browsers for Debian, like Konquer ?