Skip to content

Instantly share code, notes, and snippets.

@dllud
Last active February 8, 2024 20:29
Show Gist options
  • Save dllud/0a76c697a0f1bc0c4661 to your computer and use it in GitHub Desktop.
Save dllud/0a76c697a0f1bc0c4661 to your computer and use it in GitHub Desktop.
What to and how to configure Debian

Change keyboard layout

dpkg-reconfigure keyboard-configuration

Set locale

locale-gen dpkg-reconfigure locales vi /etc/default/locale

LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=en_US.UTF-8
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES=en_US.UTF-8
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

Set timezone

dpkg-reconfigure tzdata

Add new user and allow sudo

adduser MyNewUsername
usermod -aG sudo MyNewUsername

Rename computer (change hostname)

https://wiki.debian.org/HowTo/ChangeHostname#Rename_a_computer To go the full way: How to change a cloned GNU/Linux machine's identity

Enbable DHCPv6

vi /etc/network/interfaces append:

iface eth0 inet6 dhcp

Disable IPv6 SLAAC

vi /etc/network/interfaces:

iface eth0 inet6 dhcp
  pre-up /sbin/sysctl -w net.ipv6.conf.eth0.autoconf=0
  pre-up /sbin/sysctl -w net.ipv6.conf.eth0.accept_ra=0

Do not ask for root password on sudo

visudo

MyNewUsername ALL=NOPASSWD: ALL

Disable root account

passwd -l root

Install packages from testing or unstable

Use Apt-Pinning. APT::Default-Release won't cut it due to packages coming from stable-updates.

Create LVM partition and expand existing volume into it

parted /dev/sda
(parted) mkpart primary ext2 0 4000
(parted) set 3 lvm on
(parted) quit
pvcreate /dev/sda3
vgextend vg0 /dev/sda3
lvextend /dev/vg0 -l +100%FREE
resize2fs /dev/vg0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment