Linux (Ubuntu) setup note

OS Installation

  • Language & Keyboard
    • Japanese
  • Updates and other software
    • Minimal Installation
    • Other options
      • NOT retrieve updates
      • Install third-party software
  • Destination
    • Local drive with encryption

Initial Setup

Software Repository

vi /etc/apt/sources.list
:%s/jp.archive.ubuntu.com/REPOSITORY_HOST\/Linux/g

Essentials

apt install -y zsh byobu tmux htop vim

Automatic Update

apt install -y unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades
vim /etc/apt/apt.conf.d/50unattended-upgrades
// Unattended-Upgrade::Allowed-Origins をアンコメント
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "true";

Time Syncing

apt install -y chrony
vim /etc/chrony/chrony.conf
systemctl enable chronyd
systemctl restart chronyd
chronyc -a makestep

Root CA Certificates

証明書を以下に配置。 /usr/local/share/ca-certificates
update-ca-certificates -v

Network Filesystems

apt install -y cifs-utils nfs-common

Optional: Sysdig

Optional: Cockpit

apt install -y cockpit

Optional: NetData

Optional: Basic Securities

apt install -y logwatch fail2ban

Optional: Docker

See Docker installation notes.

Optional: VirtualBox Guest Additions

apt install -y build-essential
mount /dev/cdrom /media/
cd /media
./VBoxLinuxAdditions.run

Optional: Update Folder Names

LANG=C xdg-user-dirs-gtk-update

Update & Restart

Update Packages

apt update; apt upgrade -y; apt autoremove -y; apt autoclean

Reboot

reboot

Console Applications

Essentials

apt install -y build-essential
apt install -y \
 coreutils \
 netcat \
 p7zip \
 rsync \
 telnet \
 w3m \
 wget