Last active
December 13, 2025 05:51
-
-
Save c18s/90cc63ad7d84378e3ffaf182a646940d to your computer and use it in GitHub Desktop.
Debian environment packages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| export DEBIAN_FRONTEND=noninteractive | |
| apt-get update && apt-get -y dist-upgrade | |
| apt-get -y purge rpcbind ntp exim4 exim4-base exim4-config exim4-daemon-light | |
| apt-get -y install curl mosh htop sudo git make tmux net-tools wget nload ntpsec-ntpdate iptraf-ng mtr \ | |
| iftop w3m vim locales tcpdump unzip bc hping3 vnstat bwm-ng bmon xz-utils python3-pip \ | |
| dnsutils nethogs iperf3 acl tree ca-certificates gnupg jq | |
| apt-get -y autoremove && apt-get -y autoclean | |
| update-alternatives --set editor /usr/bin/vim.basic | |
| timedatectl set-timezone Asia/Bangkok 2>/dev/null | |
| ntpdate-debian && date | |
| sed -i '/^LC_ALL=/d;/^LC_CTYPE=/d;/^LANG=/d' /etc/environment || true | |
| rm -f /etc/locale.conf | |
| sed -i "s/^[# ]*\(en_US.UTF-8 UTF-8\)/\1/" /etc/locale.gen | |
| locale-gen | |
| update-locale LANG=en_US.utf8 LC_ALL=en_US.utf8 LC_CTYPE=en_US.utf8 | |
| systemctl disable --now systemd-resolved | |
| rm -f /etc/resolv.conf | |
| cat <<EOF | tee /etc/resolv.conf | |
| nameserver 1.1.1.1 | |
| nameserver 8.8.8.8 | |
| options timeout:2 attempts:3 | |
| EOF | |
| chattr +i /etc/resolv.conf | |
| curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/swapfile/create_swap.sh | sh | |
| curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/swapfile/sysctl_swap.sh | sh | |
| curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/sudo-privileges/sudo-privileges.sh | USER=${USERNAME:-system} sh | |
| curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/securing-ssh/securing-ssh.sh | ROOT_LOGIN=${ROOT_LOGIN:-yes} PASSWORD_LOGIN=${PASSWORD_LOGIN:-yes} X11_FORWARDING=no sh | |
| curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/bash-it/bash-it.sh | USER=root sh | |
| curl -fsSL https://raw.githubusercontent.com/c18s/LinuxScripts/master/bash-it/bash-it.sh | USER=${USERNAME:-system} sh | |
| cat /root/.ssh/authorized_keys 2>/dev/null > /etc/ssh/authorized_keys | |
| mkdir -p /root/.config/htop && echo "color_scheme=6" > /root/.config/htop/htoprc | |
| su -c "mkdir -p /home/${USERNAME:-system}/.config/htop && echo 'color_scheme=6' > /home/${USERNAME:-system}/.config/htop/htoprc" ${USERNAME:-system} | |
| echo "set-window-option -g mode-keys vi" > /root/.tmux.conf | |
| su -c "echo 'set-window-option -g mode-keys vi' > /home/${USERNAME:-system}/.tmux.conf" ${USERNAME:-system} | |
| curl -fsSL get.docker.com | sh | |
| usermod -aG docker ${USERNAME:-system} |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install options
Env variable
USERNAME=systemsystemsystemcan access root permission withsudosystemcan access docker and docker composeDefault
Advanced
/etc/ssh/authorized_keys