Debian-Based Server Setup
Debian 12 with Desktop
Run update and upgrade distro first. Install NTP package is there are errors with that. Reboot
Setup powertop and powersaving features
apt install powertop
powertop --auto-tune
Powersave governor and at reboot. Remember to run the command again
@reboot echo "powersave" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor >/dev/null 2>&1
Ensure these packages are installed
powertop htop ctop iotop fio curl gnupg wget ntfs-3g neofetch ca-certificates lsb-release hdparm openssh-server
HDD
lsblk
and blkid
to get the ntfs hard drive /dev name and the /dev/by-uuid/...
Edit the fstab to mount the drive, same entry for nvme drive
UUID=CC34294F34293E38 /mnt/data ntfs-3g 0 0
If the mounted device is HDD array, need to spindown disk with hdparm
hdparm -B 120 /dev/sdb # set the APM level
hdparm -S 241 /dev/sdb
For the -S spindown, 0-240 is multiple of 5s, 241-255 is multiple of 30 min. The above command set spindown every 30min.
Sudo without password, go to visudo and add the lines to the bottom
$USER ALL=(ALL) NOPASSWD: ALL
Edit shortcuts in bashrc
alias ll='ls -lah'
alias la='ls -A'
alias l='ls -CF'
source .bashrc