Windows - Linux - Powershell
Server install image
after choosing a releaseUbuntu Server
selectedCustom storage layout
Free space
and press EnterAdd GPT Partition
Create
, this will use the entire disk properlyInstall OpenSSH server
Done
Reboot Now
Enter
to reboot the systemip a
and connect using putty or another SSH client~/update-system.sh
to install system updates
echo 'sudo sh -c "export DEBIAN_FRONTEND=noninteractive; apt update; apt upgrade -y; apt autoremove --purge -y;"' > $HOME/update-system.sh; chmod u+x $HOME/update-system.sh
sudo timedatectl set-timezone America/New_York; echo $(timedatectl | grep "Time zone"); date
sudo timedatectl set-timezone America/Chicago; echo $(timedatectl | grep "Time zone"); date
sudo timedatectl set-timezone America/Denver; echo $(timedatectl | grep "Time zone"); date
sudo timedatectl set-timezone America/Phoenix; echo $(timedatectl | grep "Time zone"); date
sudo timedatectl set-timezone America/Los_Angeles; echo $(timedatectl | grep "Time zone"); date
sudo dpkg-reconfigure tzdata
Run the automated script
curl -sL https://raw.githubusercontent.com/Rockz1152/Ubuntu/main/ubuntu_setup.sh | sudo /bin/bash
Manual steps for the script above
sudo sed -i 's/session optional pam_motd.so/# session optional pam_motd.so/g' /etc/pam.d/sshd
sudo sed -i 's/PrintMotd yes/PrintMotd no/g' /etc/ssh/sshd_config
sudo dpkg-divert --divert /etc/apt/apt.conf.d/20apt-esm-hook.conf.bak --rename --local /etc/apt/apt.conf.d/20apt-esm-hook.conf
sudo DEBIAN_FRONTEND=noninteractive apt autoremove --purge -y cloud-init multipath-tools snapd landscape-common; sudo rm -rf /etc/cloud
sudo apt update; sudo DEBIAN_FRONTEND=noninteractive apt full-upgrade -y
sudo DEBIAN_FRONTEND=noninteractive apt install -y ncdu zstd zip unzip p7zip-full unrar-free neofetch
sudo DEBIAN_FRONTEND=noninteractive apt install -y open-vm-tools
sudo DEBIAN_FRONTEND=noninteractive apt install -y qemu-guest-agent
sudo reboot
ip link
first to retrieve the name of your network interface and make note of itsudo nano /etc/netplan/00-installer-config.yaml
network:
version: 2
renderer: networkd
ethernets:
ens18:
dhcp4: no
addresses:
- 192.168.0.XX/24
nameservers:
addresses: [1.1.1.1, 8.8.8.8]
routes:
- to: default
via: 192.168.0.1
ens18
with the name of your network interface192.168.0.XX
with your preferred host IP address192.168.0.1
to your default gatewaysudo netplan apply; ip a
sudo sed -i 's!GRUB_CMDLINE_LINUX_DEFAULT=""!GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"!' /etc/default/grub
sudo update-grub && sudo reboot
sudo apt install cockpit cockpit-pcp -y
sudo sed -i 's!renderer: networkd!renderer: NetworkManager!g' /etc/netplan/01-netcfg.yaml
sudo systemctl enable NetworkManager.service
sudo systemctl start NetworkManager.service
sudo systemctl disable systemd-networkd.service
sudo systemctl stop systemd-networkd.service
sudo netplan apply
sudo reboot
systemctl status NetworkManager | grep Active:
systemctl status systemd-networkd | grep Active:
<Server IP>:9090
sudo do-release-upgrade
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
sudo resize2fs /dev/ubuntu-vg/ubuntu-lv
df -h