debconf-set-selections
does not affect ondpkg-reconfigure console-setup
. Working approach is to/etc/default/console-setup
and then run dpkg-reconfigure console-setup
.
Run command apt install console-setup
Add line CHARMAP="UTF-8"
to file /etc/default/console-setup
Add line FONTFACE="VGA"
to file /etc/default/console-setup
Add line FONTSIZE="16x32"
to file /etc/default/console-setup
Add line CODESET="Uni1"
to file /etc/default/console-setup
Run shell command dpkg-reconfigure --frontend noninteractive console-setup
Run command apt install apt-transport-https curl
Run command apt install firmware-iwlwifi
Run command: systemctl enable rc-local
If file /etc/rc.local
does not exist create it with content:
#!/bin/bash exit 0
Run command: chmod 764 /etc/rc.local
Run command apt install rfkill
Run command:
systemctl stop bluetooth \ && systemctl disable bluetooth
Add line rfkill block bluetooth
to file /etc/rc.local
If file /etc/resolv.conf
does not exist create it with content:
nameserver 8.8.8.8 # google nameserver 77.88.8.8 # yandex
Run command: chattr +i /etc/resolv.conf
Replace or create file /etc/apt/sources.list
with content:
deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware deb https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware
Update APT cache with command apt update
.
Run command apt install openssh-server
Run command:
systemctl stop ssh \ && systemctl disable ssh
If file /home/user/.xsession
does not exist create it by copying /home/user/.xsession
Run commands:
chmod user:user /home/user/.xsession
source ~/.bashrc.personal
to "~/.bashrc"
Run command apt install sudo
Add user user
to group sudo
Run command apt install python3-venv git vim-nox
Run command apt install xorg xserver-xorg-input-synaptics xserver-xorg-input-all awesome slim dbus-x11 vim-gui-common xbindkeys rxvt-unicode xss-lock flameshot slock brightnessctl
Run shell command update-alternatives --set x-terminal-emulator /usr/bin/urxvt
Run command apt install ttf-bitstream-vera
Run command apt install network-manager network-manager-gnome network-manager-openvpn
Replace or create file /etc/network/if-post-down.d/zz_random_mac
with content:
#!/bin/sh # # Randomize MAC address. # This hook is not as same as default macchanger hook: this hook use -A flag. # This hook is post-down because NetworkManager does not run pre-up hooks. # There is also symlink to this file in pre-up LOGFILE="/var/log/post_down_random_mac.log" echo "DATE: $(date)" | tee -a $LOGFILE echo "IFACE: $IFACE" | tee -a $LOGFILE if [ "$IFACE" = "--all" -o "$IFACE" = "lo" -o "$IFACE" = "" ]; then echo "Ignoring interface [$IFACE]" | tee -a $LOGFILE exit 0 fi /usr/bin/macchanger -A $IFACE 2>&1 | tee -a $LOGFILE
Run command: ln -s ../if-post-down.d/zz_random_mac /etc/network/if-pre-up.d/zz_random_mac
Replace or create file /etc/network/if-post-down.d/zz_random_hostname
with content:
#!/bin/sh # # Randomize hostname. # This hook is post-down because NetworkManager does not run pre-up hooks. # There is also symlink to this file in pre-up LOGFILE="/var/log/post_down_random_hostname.log" echo "DATE: $(date)" | tee -a $LOGFILE echo "IFACE: $IFACE" | tee -a $LOGFILE if [ "$IFACE" = "--all" -o "$IFACE" = "lo" -o "$IFACE" = "" ]; then echo "Ignoring interface [$IFACE]" | tee -a $LOGFILE exit 0 fi NEW_HOSTNAME=$(cat /dev/urandom | head -c 100 | md5sum | head -c 8) echo "HOSTNAME: $(/usr/bin/hostname)" | tee -a $LOGFILE echo "NEW HOSTNAME: $NEW_HOSTNAME" | tee -a $LOGFILE /usr/bin/hostnamectl set-hostname $NEW_HOSTNAME 2>&1 | tee -a $LOGFILE
Run command: ln -s ../if-post-down.d/zz_random_hostname /etc/network/if-pre-up.d/zz_random_hostname
Run command apt install avahi-daemon
In file /etc/avahi/avahi-daemon.conf
search for line matching ^\s*#?\s*disable-publishing\s*=
and replace it with disable-publishing=yes
. If no match, insert this line before EOF
Run command: systemctl restart avahi-daemon
Download document at https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg and save it to /usr/share/keyrings/brave-browser-archive-keyring.gpg , do nothing if file exists already
If file /etc/apt/sources.list.d/brave-browser-release.list
does not exist create it with content:
deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main
Update APT cache with command apt update
.
Run command apt install pulseaudio pavucontrol alsa-utils
Run command apt install mariadb-client git mercurial p7zip-full unrar xz-utils libcurl4-openssl-dev libssl-dev build-essential strace screen tmux iotop python-is-python3 python3-venv dnsutils whois traceroute pkg-config python3-pip psmisc rsync
Add setting net.ipv4.ip_default_ttl
= 65
to /etc/sysctl.conf
and run sysctl -p
Run command apt install smartmontools
Add setting net.ipv6.conf.all.disable_ipv6
= 1
to /etc/sysctl.conf
and run sysctl -p
Add setting net.ipv6.conf.default.disable_ipv6
= 1
to /etc/sysctl.conf
and run sysctl -p
In file /etc/default/grub
search for line matching ^GRUB_CMDLINE_LINUX_DEFAULT="(.+)"
and replace it with GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 \1"
. If no match, insert this line before EOF
Run shell command update-grub
Run command apt install tlp
Run command apt install brightnessctl
Add key located at https://github.com/lorien.keys to SSH authorized keys of user root
Add line PasswordAuthentication no
to file /etc/ssh/sshd_config
Add line ChallengeResponseAuthentication no
to file /etc/ssh/sshd_config
Run command: systemctl restart ssh
Add setting vm.swappiness
= 1
to /etc/sysctl.conf
and run sysctl -p
Run command apt install flameshot
Add setting fs.inotify.max_user_watches
= 524288
to /etc/sysctl.conf
and run sysctl -p
Run command:
mkdir -p /home/user/Downloads \ && chown user:user /home/user/Downloads
Run command:
ln -s /home/user/Downloads /home/user/down \ && chown user:user /home/user/down
Run shell command reboot