ubuntu 19 speed up local samba access

sudo nano /etc/nsswitch.conf

hosts:          files wins dns mdns4_minimal [NOTFOUND=return]

sudo nano /etc/avahi/avahi-daemon.conf

use-ipv6=no

disable ipv6 in wifi/eth0 interfaces

sudo ufw disable
sudo sysctl vm.swappiness=10

sudo su
echo "#disable ipv6" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf

sudo nano /etc/samba/smb.conf

add
netbios name = linuxlap1
name resolve order = lmhosts wins bcast host

backup /etc with tar

The following is an exemplary command of how to archive your system.

tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --one-file-system /etc

back.sh (backup with timestamp) – add to cron (sh /back.sh)

#!/bin/bash
DATE=$(date +%Y-%m-%d-%H%M%S)
BACKUP_DIR="/backup"
SOURCE="/etc"
tar -cvzpf $BACKUP_DIR/backup-$DATE.tar.gz $SOURCE

headless ubuntu fsck waits for Y key during bootup

I have a headless Ubuntu 12.04 server in a datacenter 1500 miles away. Twice now on reboot the system decided it had to fsck. Unfortunately Ubuntu ran fsck in interactive mode, so I had to ask someone at my datacenter to go over, plug in a console, and press the Y key. How do I set it up so that fsck runs in non-interactive mode at boot time with the -y or -p (aka -a) flag?

For Ubuntu 15,16,17+ the FSCKFIX value setting is located in /lib/init/vars.sh

sudo nano /lib/init/vars.sh

change FSCKFIX=no to FSCKFIX=yes