How to install and set up Debian

Jun Takemura · October 1, 2024

Since I bought a new laptop (refurbed thinkpad X1 carbon 6th gen) and installed Debian, I thought I’d share a quick guide for setting it up.

Prepare live usb stick with Debian

Download Debian from the official website and create a bootable USB drive. You can use Rufus for this. For the desktop environment, I chose xfce as it’s lighter and simpler than gnome.

Boot Debian from USB

If you use Windows 11, you can USB boot via System > Recovery > Advance startup. You can also open BIOS by pressing F9, F12, etc. (depending on your environment) during the boot sequence.

Install Debian

Choose the default options and install Debian. Since I wated to focus on pentesting, I chose single boot and erased Windows. The problem is even Debian 12 lacks iwlwifi firmware and you can’t use Wifi right away. There are serveral options to solve this.

  1. Prepare iwlwifi in a different USB drive You can download iwlwifi and put it in a different USB drive from the bootable one. This way you can load and install iwlwifi to Debian.

  2. Use ethernet If you can directly connect a ethernet cable, use it.

  3. Smartphone USB tethering This is the option I used. Connect your smartphone with USB tethering enabled to your computer, and choose its network interface when starting network configuration. iwlwifi will be automatically installed during the installation process, so after successfully installing Debian, you don’t need to install iwlwifi yourself.

After installation

1. Allows a user to use sudo

By default, a newly created user can’t use sudo as they’re not in the sudo group.

su -
usermod -aG sudo your_username

After running this command, you need to re-login.

2. Change font and dpi

If you use xfce, go to Applications > Settings > Appearance. Here you can change the font, dpi and window scale. I set the dpi to 144 while keeping the window scale 1x.

3. Update

You can automate updates by using UnattendedUpgrades. Otherwise you should run bash sudo apt update && sudo apt upgrade && sudo apt autoremove occasionally.

4. Add multiple languages

If you only speak European languages, go to Settings > Keyboard and add physical keyboard layouts. Otherwise you should install IBus.

In the case of Japanese, install IBus with Mozc: bash sudo apt install ibus ibus-mozc

Set IBus as your input method framework: bash im-config -n ibus After running this, log out and log back in.

By right-clicking the taskbar > Panel, you can add an IBus widget to the taskbar. `

5. Set up git and github

Install git:

sudo apt install git

Set your name and email:

git config --global user.name "**your_name**"
git config --global user.email "**your_email**"

Create an ssh key:

ssh-keygen -t ed25519 -C "**your_email**"

Start the ssh agent:

eval "$(ssh-agent -)"

Add your private key to the agent:

ssh-add ~/.ssh/id_ed25519

Copy your ssh key and add it to github

cat ~./ssh/id_ed25519.pub

Test the connection

Other Settings

By default I had to ture the volume down every time I logged in to Debian, so I set the master volume to mute on startup. Go to Settings Manager > Session and Startup, and add this to Application Autostart:

amixer set Master mute

Twitter, Facebook