ls '/etc/hosts~' || wget -O '/tmp/hosts-tmp' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && sudo cp --backup '/tmp/hosts-tmp' '/etc/hosts' && sync
ls '/etc/hosts~' && wget -O '/tmp/hosts-tmp' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && sudo mv --force '/tmp/hosts-tmp' '/etc/hosts' && sync
ls '/etc/hosts~' && sudo mv --force '/etc/hosts~' '/etc/hosts' && sync
#
to the line mentioning cdrom
E: The repository file:/cdrom mantic Release no longer has a Release file.
sudo -e '/etc/apt/sources.list'
#deb [check-date=no] file:///cdrom mantic main restricted
universe
is likely neededsudo add-apt-repository 'universe'
sudo add-apt-repository 'multiverse'
sudo add-apt-repository 'restricted'
wget -O '/tmp/code_signing_key.asc' 'https://keybase.io/docs/server_security/code_signing_key.asc' && sudo mv '/tmp/code_signing_key.asc' '/etc/apt/trusted.gpg.d/keybase.asc' && sync
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean && sync
sudo fwupdmgr refresh --force && sudo fwupdmgr update --verbose && sync
sudo snap refresh
rm -Rf '/tmp/keybase_amd64.deb' && wget -O '/tmp/keybase_amd64.deb' 'https://prerelease.keybase.io/keybase_amd64.deb' && sudo apt install '/tmp/keybase_amd64.deb' && rm '/tmp/keybase_amd64.deb' && sync && run_keybase
GRUB_CMDLINE_LINUX_DEFAULT=
sudo -e '/etc/default/grub' && sudo update-grub
sudo systemctl enable 'fstrim.timer' --now && sudo systemctl start 'fstrim' && sync && sudo systemctl status 'fstrim' -l
xfsprogs
to be installedsudo apt install 'xfsprogs'
sudo systemctl enable 'xfs_scrub_all.timer' --now && sudo systemctl start 'xfs_scrub_all' && sync && sudo systemctl status 'xfs_scrub_all' -l
sudo timedatectl set-local-rtc '0'
timedatectl | grep local
sudo apt install lm-sensors
sudo sensors-detect --auto
sudo watch --interval '0.5' sensors
sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw allow 'ssh' && sudo ufw enable && sudo systemctl enable 'ufw'
sudo -e '/etc/apt/apt.conf.d/99auto-update-custom'
Dpkg::Options { "--force-confdef"; "--force-confold"; }
sudo -e '/etc/systemd/system/ubuntu-up.service'
[Service] Type=oneshot ExecStartPre='/usr/bin/apt' clean ExecStart='/usr/bin/apt' update ExecStart='/usr/bin/apt' full-upgrade -y ExecStart='/usr/bin/apt' autoremove -y ExecStart='/usr/bin/snap' refresh ExecStartPost='/usr/bin/sync' ExecStartPost='/usr/bin/systemctl' reboot
00:00
Alirasudo -e '/etc/systemd/system/ubuntu-up.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'ubuntu-up.timer' --now
[Unit] Description=Software Package Maintenance and Updater After=network-online.target Wants=network-online.target [Timer] OnCalendar=*-*-* 00:00:00 Persistent=true [Install] WantedBy=timers.target
/dev/sdb1
sudo mkdir -p '/mnt/USB' && sudo -e '/etc/fstab'
# USB /dev/sdb1 /mnt/USB xfs rw,relatime,attr2,inode64,noquota 0 2
sudo mount '/dev/sdb1'
sudo -e '/etc/systemd/system/backup-external.service' && sudo sed -i 's/CHANGEME/'$USER'/g' '/etc/systemd/system/backup-external.service'
[Service] Type=oneshot ExecStartPre='/usr/bin/sync' ExecStart='/usr/bin/rsync' -r '/home/CHANGEME/backups' '/mnt/USB' --verbose --ignore-existing ExecStartPost='/usr/bin/sync'
sudo -e '/etc/systemd/system/backup-external.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'backup-external.timer' --now
[Unit] Description=Backup Backups to External Device [Timer] OnCalendar=*-*-* 07:00:00 Persistent=true [Install] WantedBy=timers.target