Skip to content

Instantly share code, notes, and snippets.

@duffyjp
Last active March 3, 2021 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duffyjp/87895b9f6e0b8e4a46a27a5384263219 to your computer and use it in GitHub Desktop.
Save duffyjp/87895b9f6e0b8e4a46a27a5384263219 to your computer and use it in GitHub Desktop.
This is an ever evolving script I run on new Ubuntu VMs under Hyper-V.
#!/bin/bash
echo "Set Timezone to CST"
timedatectl set-timezone America/Chicago
echo "Update Apt"
apt-get update -qq
echo "Remove Unused Default Packages"
apt-get remove -y --purge snapd cloud-init lxd
echo "Install Azure Kernel and mDNS"
apt-get install -y -qq linux-azure avahi-utils
echo "Apt Autoremove"
apt-get -y autoremove
echo "Apt Upgrade"
apt-get upgrade -y -qq
echo "Alias gs to 'git status'"
grep -qxF "alias gs='git status'" ~/.bashrc || echo "alias gs='git status'" >> ~/.bashrc
echo "Disable IPV6 via GRUB"
sed -i 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="ipv6.disable=1"/' /etc/default/grub
update-grub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment