Skip to content

Instantly share code, notes, and snippets.

@apolloalves
apolloalves / Ubuntu Upgrade.sh
Created April 15, 2022 01:28 — forked from wojtekk/Ubuntu Upgrade.sh
Upgrade Ubuntu and remove old packages, configs, ...
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get clean
sudo dpkg --purge $(COLUMNS=200 dpkg -l | grep "^rc" | tr -s ' ' | cut -d ' ' -f 2)
tested in OS 10.9.5
Configure Postfix for Gmail SMTP
Edit file /etc/postfix/main.cf
sudo vim /etc/postfix/main.cf
and add in the following below the commented out relayhosts :-
relayhost = [smtp.gmail.com]:587
@apolloalves
apolloalves / ubuntu-raid.sh
Last active September 14, 2020 20:00 — forked from umpirsky/ubuntu-raid.sh
Install Ubuntu on RAID 0 and UEFI/GPT system
# http://askubuntu.com/questions/505446/how-to-install-ubuntu-14-04-with-raid-1-using-desktop-installer
# http://askubuntu.com/questions/660023/how-to-install-ubuntu-14-04-64-bit-with-a-dual-boot-raid-1-partition-on-an-uefi%5D
sudo -s
apt-get -y install mdadm
apt-get -y install grub-efi-amd64
sgdisk -z /dev/sda
sgdisk -z /dev/sdb
sgdisk -n 1:0:+100M -t 1:ef00 -c 1:"EFI System" /dev/sda
sgdisk -n 2:0:+8G -t 2:fd00 -c 2:"Linux RAID" /dev/sda