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&curlmust be installed alreadygpgrecommended 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.shwith 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.shexecutable
chmod +x "setup-desktop.sh"
- Verify the checksum of
setup-desktop.shagainstSHA256SUMS_DESKTOP
sha256sum --ignore-missing -c "SHA256SUMS_DESKTOP"
- Run the setup script
./setup-desktop.sh
- Change working directory to
/tmp
cd /tmp
- Download
setup-server.shwith 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.shexecutable
chmod +x "setup-server.sh"
- Verify the checksum of
setup-server.shagainstSHA256SUMS_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
.bashrcfor 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.servicefrom starting automatically
- Install Signal
- Add Signal repository
- Install
signal-desktop
- Install Node Version Manager
- Install latest
nvmversion to current user - Update
.bashrcto usenvmautomatically in directories with a.nvmrcfile - Install latest stable version of Node.js
- Creates the
nvmaliasdefaultwhich points to the latest stable release
- Install latest
- Install & configure Vim
- Install
vim-nox& YouCompleteMe dependencies - Install
ycmcompilescript in/usr/local/bin/ - Clone vim-config repository to
~/.vim - Create symlink in
~to custom.vimrc - Install custom
.vimrcfor root user - Install the following Nerd Fonts for current user
- DejaVuSansMono
- FiraCode
- Hack
- JetBrainsMono
- Install
- Install & configure Rclone
- Install latest
rcloneversion - Create directories for mounting Google Drive VFS
- Create directory
~/.config/rclone/ - Install systemd unit files for running
rcloneas a service - Install dispatcher script so
rcloneruns 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)tempsdnsleaktest
- 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
.bashrcfor 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
.vimrcfor current user - Install custom
.vimrcfor root user
- Install custom
- Autoremove and clean packages using
apt-get - Install custom scripts/commands for all users
autoupgrade(requires sudo)tempsdnsleaktest
- 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