A script to automate the setup of a new Debian based operating system, tuned to my personal liking. Included are setup scripts for both Debian based desktops and servers.
- Debian or Debian based operating system
- Gnome or Plasma is required for desktop usage
- Access to terminal/shell where output is visible
- Terminal/shell user has sudo privileges
bash
&curl
must be installed alreadygpg
recommended for signature verification- Working internet connection
Add xmready's PGP signing key to your keyring
gpg --keyserver "hkps://keys.openpgp.org" --recv-keys 17AF13F5D2F5013A
- Change working directory to
/tmp
cd /tmp
- Download
setup-desktop.sh
with the checksums & signature from the latest release
curl \
--fail \
--location \
--output-dir "$PWD" \
--remote-name \
"https://github.com/xmready/setup-debian/releases/latest/download/{setup-desktop.sh,SHA256SUMS_DESKTOP,SHA256SUMS_DESKTOP.sign}"
- Verify the PGP signature
gpg --verify "SHA256SUMS_DESKTOP.sign" "SHA256SUMS_DESKTOP"
- Make
setup-desktop.sh
executable
chmod +x "setup-desktop.sh"
- Verify the checksum of
setup-desktop.sh
againstSHA256SUMS_DESKTOP
sha256sum --ignore-missing -c "SHA256SUMS_DESKTOP"
- Run the setup script
./setup-desktop.sh
- Change working directory to
/tmp
cd /tmp
- Download
setup-server.sh
with the checksums & signature from the latest release
curl \
--fail \
--location \
--output-dir "$PWD" \
--remote-name \
"https://github.com/xmready/setup-debian/releases/latest/download/{setup-server.sh,SHA256SUMS_SERVER,SHA256SUMS_SERVER.sign}"
- Verify the PGP signature
gpg --verify "SHA256SUMS_SERVER.sign" "SHA256SUMS_SERVER"
- Make
setup-server.sh
executable
chmod +x "setup-server.sh"
- Verify the checksum of
setup-server.sh
againstSHA256SUMS_SERVER
sha256sum --ignore-missing -c "SHA256SUMS_SERVER"
- Run the setup script
./setup-server.sh
For Debian desktop systems setup-desktop.sh
will do the following:
- Update & upgrade all packages with
apt-get
- Install the following packages with
apt-get
- bash-completion
- build-essential
- checkinstall
- curl
- fastfetch
- flatpak
- fprintd
- fzf
- git
- gnupg
- incus
- libpam-fprintd
- lm-sensors
- nmap
- pipx
- python3-pip
- qrencode
- rename
- rsync
- ssh-audit
- ufw
- wget
- Customize
.bashrc
for the current user- Increase
HISTSIZE
&HISTFILESIZE
- Customize prompt to display time, working dir, & current Git branch if applicable
- Replace prompt symbol with arrow
- Place prompt symbol & user input on newline
- Disable Flow Control
- Append current session's command history to the history file
- Read any new lines from the history file
- Set up fzf key bindings and fuzzy completion
- Increase
- Enable fingerprint authentication
- Install Tor
- Add Tor repository
- Install
tor
&deb.torproject.org-keyring
- Disable
tor.service
from starting automatically
- Install Signal
- Add Signal repository
- Install
signal-desktop
- Install Node Version Manager
- Install latest
nvm
version to current user - Update
.bashrc
to usenvm
automatically in directories with a.nvmrc
file - Install latest stable version of Node.js
- Creates the
nvm
aliasdefault
which points to the latest stable release
- Install latest
- Install & configure Vim
- Install
vim-nox
& YouCompleteMe dependencies - Install
ycmcompile
script in/usr/local/bin/
- Clone vim-config repository to
~/.vim
- Create symlink in
~
to custom.vimrc
- Install custom
.vimrc
for root user - Install the following Nerd Fonts for current user
- DejaVuSansMono
- FiraCode
- Hack
- JetBrainsMono
- Install
- Install & configure Rclone
- Install latest
rclone
version - Create directories for mounting Google Drive VFS
- Create directory
~/.config/rclone/
- Install systemd unit files for running
rclone
as a service - Install dispatcher script so
rclone
runs when connected to the internet
- Install latest
- Autoremove and clean packages using
apt-get
- Install verified Flatpak apps
- Firefox
- GIMP
- GnuCash
- Kdenlive
- KeePassXC
- Kleopatra
- Plex
- qBittorrent
- Rnote
- Thunderbird
- Ungoogled Chromium
- Install custom scripts/commands for all users
autoupgrade
(requires sudo)temps
dnsleaktest
- Harden network security
- Disable tcp timestamps
- Set default firewall policy with
ufw
- Enable
ufw
- Reboot system after 60 seconds
For Debian server systems setup-server.sh
will do the following:
- Update & upgrade all packages with
apt-get
- Install the following packages with
apt-get
- curl
- fail2ban
- git
- gnupg
- lm-sensors
- rsync
- screen
- ufw
- Customize
.bashrc
for the current user- Increase
HISTSIZE
&HISTFILESIZE
- Disable Flow Control
- Append current session's command history to the history file
- Read any new lines from the history file
- Increase
- Configure Vim
- Install custom
.vimrc
for current user - Install custom
.vimrc
for root user
- Install custom
- Autoremove and clean packages using
apt-get
- Install custom scripts/commands for all users
autoupgrade
(requires sudo)temps
dnsleaktest
- Harden network security
- Disable tcp timestamps
- Set default firewall policy with
ufw
- Allow incoming connections on port 22 with
ufw
- Enable
ufw
- Generate a new & strong ssh host key with
ssh-keygen
- Install hardened ssh config file
- Reboot system after 60 seconds