Last active
May 25, 2024 01:44
-
-
Save willjasen/61b8c2e0211a632f05f20e024efe2363 to your computer and use it in GitHub Desktop.
set up an image of ubuntu 22.04 for me
This file contains 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 | |
# Image version - v2.3 | |
# Update the operating system | |
apt update; DEBIAN_FRONTEND=noninteractive apt upgrade -y; | |
# Install common tools | |
apt install curl git wget net-tools screen jq locate -y; | |
# Install management tools | |
apt install ssh openssl qemu-guest-agent cryptsetup gparted htop nmon iostat iotop -y; | |
# Install network diagnostics tools | |
apt install iputils-ping traceroute dnsutils -y; | |
# Ensure QEMU guest agent is started and enabled | |
systemctl start qemu-guest-agent; | |
systemctl enable qemu-guest-agent | |
# Clean up no longer needed dependencies | |
apt autoremove -y; | |
# Configure GNOME | |
gsettings set org.gnome.desktop.interface clock-format '12h'; | |
# Configure host with public key | |
# (currently not running true with this script but is okay manually) | |
#if [[ $(dig TXT ssh.willjasen.com +short +dnssec) ]]; then | |
# dig TXT ssh.willjasen.com +short | sed -e 's/" "//g' -e 's/"//g' > ~/.ssh/willjasen.pub | |
# ssh-copy-id -f -i ~/.ssh/willjasen localhost | |
#else | |
# echo "DNSSEC is not validated for SSH key, script is exiting..." | |
# exit | |
#fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment