Skip to content

debian

ssh access

man

cd ~/.ssh/ && touch authorized_keys && chmod 600 authorized_keys

Note

allow only public key access

nano /etc/ssh/sshd_config
PermitRootLogin prohibit-password

network

interfaces

https://manpages.debian.org/bookworm/ifupdown-ng/interfaces.5.en.html

check interface

ip addr show
or
ip link show

define static address

nano /etc/network/interfaces
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
allow-hotplug ens18
#iface ens18 inet dhcp
iface ens18 inet static
  address 10.0.0.50/8
  gateway 10.0.0.1
#  dns-nameservers 10.0.0.10 1.1.1.1
iface ens18 inet6 auto

reload interface

systemctl restart networking.service

motd

apt install figlet
echo 'uname -snrvm' >> /etc/update-motd.d/10-uname ## this is already in here
echo 'figlet <hostname>' >> /etc/update-motd.d/10-uname

terminal shortcuts

use permanent alias

nano ~/.bashrc
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "$(dircolors)"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -la'
# alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

source it to refresh its alias

source ~/.bashrc

qemu-guest-agent

install qemu-quest-agent to be able to do snapshots and proper freeze. stop still better than suspend for fullbackups.

apt install qemu-guest-agent

enable notification

see msmtp