This guide outlines the steps to set up a basic Debian 12 system: configuring networking, enabling SSH, and installing essential utilities like Zsh.
apt install network-manager
nmtui
ssh root@192.168.1.25dpkg --print-architectureapt update
apt upgrade -yapt install bash nano net-tools -yapt install openssh-server openssh-client ssh -yEdit SSH configuration if needed:
nano /etc/ssh/sshd_configAdd this line at the end of the file:
PermitRootLogin yesAlso ensure PasswordAuthentication is enabled. Uncomment and set:
PasswordAuthentication yesEnable and start SSH:
systemctl enable ssh
systemctl start ssh
systemctl restart sshEdit the interfaces file:
nano /etc/network/interfacesExample configuration:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface (enp0s3)
allow-hotplug enp0s3
iface enp0s3 inet static
address 192.168.1.25
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 8.8.8.8
iface enp0s3 inet6 auto
# The secondary network interface (enp0s8)
allow-hotplug enp0s8
iface enp0s8 inet static
address 192.168.2.10
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
dns-nameservers 8.8.8.8
iface enp0s8 inet6 autonano /etc/resolv.confExample content:
nameserver 8.8.8.8
systemctl restart networkingBring interfaces down and up:
ifdown enp0s3 && ifup enp0s3
ifdown enp0s8 && ifup enp0s8Reboot:
rebootssh nikhil@192.168.1.21Switch to root:
su - rootEdit the source list:
nano /etc/apt/sources.listInstall HTTPS transport support:
apt install apt-transport-https -yExample Debian 11 (Bullseye) source list:
deb cdrom:[Debian GNU/Linux 11.6.0 _Bullseye_ Official amd64 NETINST] bullseye main
deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye-updates main
Example Debian 12 (Bookworm) source list:
deb https://deb.debian.org/debian/ bookworm main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main non-free-firmware
apt install nano fonts-lato fonts-open-sans fonts-roboto fonts-mononoki fonts-indic zsh net-tools curl wget unzip -yReconnect if needed:
ssh root@192.168.1.21Check current shell:
echo $SHELLView available shells:
cat /etc/shellsInstall Zsh and plugins:
apt install zsh zsh-autosuggestions zsh-syntax-highlighting -yCheck version and path:
zsh --version
which zshSet for current user:
chsh -s $(which zsh)Verify:
grep zsh /etc/passwdEdit Zsh config:
nano /root/.zshrcexport PS1='%n@%m# '
For another user:
```bash
su - nikhil
chsh -s $(which zsh)
nano /home/nikhil/.zshrc