assuming you’ve set it up already
Clean-up the configuration file
mv -i /etc/apt/sources.list /etc/apt/sources.list.dist grep -vE '^#|^$' /etc/apt/sources.list.dist > /etc/apt/sources.list
find about your nearest mirror
wget -qO - mirrors.ubuntu.com/mirrors.txt
and point the repositories against it e.g.
vi /etc/apt/sources.list deb http://mirrors.online.net/ubuntu focal main restricted universe multiverse deb http://mirrors.online.net/ubuntu focal-updates main restricted universe multiverse deb http://mirrors.online.net/ubuntu focal-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse
Alternatively, you can build your own configuration with some helper
And in case you have an HTTP PROXY on your network for that purpose
nmap -p 3142 x.x.x.x vi /etc/apt/apt.conf.d/02proxy Acquire::http { Proxy "http://x.x.x.x:3142"; }; apt update
Check for major release uprgade
do-release-upgrade
Proceed with patches
cat /etc/apt/apt.conf.d/02proxy apt update apt full-upgrade
and see Ubuntu Server Operations for further maintenance
Install a few more packages.
export DEBIAN_FRONTEND=noninteractive vi /etc/apt/apt.conf.d/50disable-pipeline Acquire::http::Pipeline-Depth 0;
Bare-metal
apt install \ ethtool \ hwinfo \ screen \ sudo #xfsprogs \ #xfsdump \
Server system
openssh-server \ openssh-client \
and even more for any kind of system incl. some container that you need to troubleshoot
apt install \ apt-utils locales tzdata \ apt-transport-https \ bash-completion \ biff \ bzip2 \ colordiff \ curl \ dialog \ dma \ dnsutils \ dos2unix \ elvis-tiny \ git \ htop \ iftop \ ifupdown \ iputils-ping \ iotop \ ksh \ less \ lftp \ lsb-release \ lynx \ man-db \ manpages \ mlocate \ mtr \ net-tools \ netcat \ ngrep \ nmap \ ntpdate \ procps \ pwgen \ software-properties-common \ sysstat \ telnet \ traceroute \ unzip \ uuid \ uuid-runtime \ wget \ whois \ xxd apt purge iputils-tracepath
and in case this is really a workstation
apt install vim-nox # nvi
define some defaults
update-alternatives --config vi update-alternatives --config editor git config pull.rebase false # merge (the default strategy)
moar packages
# ifupdown2 \ # inetutils-ping \ # mc \ # tcptraceroute # ntp ntpstat
note iputils-ping
is preferred (PTR-capable)
How to select the fastest apt mirror on Ubuntu Linux https://linuxconfig.org/how-to-select-the-fastest-apt-mirror-on-ubuntu-linux
https://askubuntu.com/questions/786334/proxy-problems-after-upgrade-to-ubuntu-16-04-apt-1-2