scripts:ubuntu-base

#!/bin/sh
 
# Do a root check
if [ $(id -u) -ne 0 ]; then
  echo "This script must be run as root.";
  exit 99;
fi
 
# Disable installation of recommended and suggested packages
echo 'APT::Install-Recommends "0";
APT::Install-Suggests "0";' > /etc/apt/apt.conf
 
# Set all packages to automatically installed
apt-mark showmanual | xargs apt-mark auto
 
# Update the package sources and do a full upgrade
apt update
apt full-upgrade -y
 
# Install the base system
apt install -y acpi-support alsa-base alsa-topology-conf alsa-utils anacron apparmor avahi-autoipd avahi-daemon avahi-utils bash-completion busybox-static command-not-found console-setup cron dmidecode ed friendly-recovery grub-pc htop info irqbalance less libgl1-mesa-dri libglu1-mesa libnss-mdns linux-image-generic locales logrotate lshw lsof ltrace man-db manpages mawk nano openssh-server pciutils perl plymouth plymouth-theme-spinner strace sudo systemd tzdata unattended-upgrades usbutils vim-tiny whiptail x11-utils xserver-xorg xserver-xorg-core xserver-xorg-input-libinput xserver-xorg-video-fbdev xserver-xorg-video-vesa xserver-xephyr
 
# Install file/disk tools
apt install -y btrfs-progs e2fsprogs ecryptfs-utils eject f2fs-tools fdisk file gdisk genisoimage hdparm libblockdev-crypto2 lsscsi rsync time unar unzip zip
 
# Install net tools
apt install -y curl bind9-dnsutils dns-root-data dnsmasq-base ftp iftop iptables iputils-ping iputils-tracepath isc-dhcp-client iw mtr-tiny netbase netcat-openbsd netplan.io networkd-dispatcher network-manager network-manager-config-connectivity-ubuntu network-manager-openvpn publicsuffix rfkill tcpdump telnet traceroute ufw usb-modeswitch wget whois wireless-tools
 
# Install fonts
apt install -y fonts-cantarell fonts-croscore fonts-crosextra-caladea fonts-crosextra-carlito fonts-dejavu-core fonts-emojione fonts-freefont-ttf fonts-liberation2 fonts-noto-cjk fonts-noto-color-emoji fonts-noto-mono fonts-open-sans fonts-ubuntu gsfonts
 
# Install CUPS and SANE
apt install -y cups cups-browsed cups-bsd cups-pk-helper foomatic-db-compressed-ppds ghostscript ghostscript-x hplip libsane-hpaio openprinting-ppds printer-driver-hpcups printer-driver-postscript-hp
 
# Install GNOME base
apt install -y at-spi2-core dconf-cli dbus dbus-user-session dbus-x11 dmz-cursor-theme gdm3 gkbd-capplet gnome-backgrounds gnome-bluetooth gnome-control-center gnome-control-center-faces gnome-getting-started-docs gnome-getting-started-docs-nl gnome-keyring gnome-menus gnome-online-accounts gnome-power-manager gnome-shell gnome-shell-extensions gnome-shell-extension-appindicator gnome-shell-extension-desktop-icons gnome-shell-extension-ubuntu-dock gnome-session-canberra gnome-user-docs gnome-user-docs-nl gsettings-ubuntu-schemas gvfs gvfs-backends gvfs-bin gvfs-fuse hunspell-nl language-pack-gnome-nl libcanberra-gtk3-module libcanberra-pulse libgdk-pixbuf2.0-bin libgsf-bin libnotify-bin libpam-gnome-keyring mutter network-manager-gnome network-manager-openvpn-gnome policykit-desktop-privileges system-config-printer system-config-printer-udev ubuntu-session ubuntu-settings ubuntu-wallpapers xdg-dbus-proxy xdg-desktop-portal-gtk xdg-user-dirs-gtk yaru-theme-gnome-shell yaru-theme-gtk yaru-theme-icon yaru-theme-sound
 
# Install GNOME applications
apt install -y baobab dconf-editor eog evince file-roller fprintd fwupd gedit gnome-calculator gnome-calendar gnome-characters gnome-clocks gnome-disk-utility gnome-font-viewer gnome-screenshot gnome-software gnome-software-plugin-flatpak gnome-software-plugin-snap gnome-startup-applications gnome-system-monitor gnome-terminal gnome-tweaks gnome-weather nautilus nautilus-extension-gnome-terminal seahorse simple-scan update-manager update-notifier
 
# Install multimedia
apt install -y gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-libav gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio gstreamer1.0-x pulseaudio pulseaudio-module-bluetooth rtkit totem totem-plugins
 
# Install Firefox
apt install -y chrome-gnome-shell firefox firefox-locale-nl libu2f-udev
 
# Install Thunderbird
apt install thunderbird thunderbird-gnome-support thunderbird-locale-nl
 
# Install LibreOffice
apt install hunspell-nl libreoffice-calc libreoffice-gnome libreoffice-gtk3 libreoffice-l10n-nl libreoffice-help-nl libreoffice-impress libreoffice-pdfimport libreoffice-style-sifr libreoffice-writer
 
# Install games
apt install aisleriot branding-ubuntu gnome-cards-data gnome-mahjongg gnome-mines
 
# Disable Geoclue daemon
systemctl mask geoclue.service
 
# Automatically remove all unneeded packages
apt autoremove --purge
apt clean
 
# Purge all remaining configuration files
dpkg -l | grep  ^rc | awk '{print $2}' | xargs dpkg --purge remove
 
# Clear the network interfaces, let NetworkManager take over
echo '# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager' > /etc/netplan/01-network-manager-all.yaml
 
rm /etc/netplan/01-netcfg.yaml
  • scripts/ubuntu-base.txt
  • Last modified: 2021/01/07 16:10
  • by Kevin Keijzer