Ubuntu postinstall
Things to do after installing
Warning
The default locale in Ubuntu for traditional Chinese (Taiwan) is lzh_TW
rather than zh_TW
, which might cause issues. You can change it to zh_TW
by editing the file /etc/locale.gen
. Comment out the lzh_TW
line and uncomment the zh_TW
line. And then run:
sudo locale-gen
Finally, install the Traditional Chinese locale in
Language Support
and then set locale to Taiwan
to solve this problem.
Make software repo point to NCHC for faster network speed¶
You can replace archive.ubuntu.com
with a closer mirror, e.g., tw.archive.ubuntu.com
or free.nchc.org.tw
in /etc/apt/sources.list
. After you are done, run:
sudo apt clean && sudo apt update && sudo apt full-upgrade -y
(Optional) Remove snap¶
List snap packages
snap list
Uninstall each Snap package
sudo snap remove $PKG
Stop the snapd service and uninstall it
sudo systemctl stop snapd
sudo apt remove --autoremove --purge snapd
sudo apt-mark hold snapd
Setup 3rd party apps¶
Adding 3rd party repositories for latest packages not available in xUbuntu's official repositories.
First, install required package
sudo apt update && sudo apt install -y apt-transport-https ca-certificates curl git gnupg-agent software-properties-common
Brave browser¶
Setup Brave browser
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list > /dev/null
sudo apt update && sudo apt install -y brave-browser
Git¶
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt update && sudo apt install -y git git-lfs
qBittorrent¶
sudo add-apt-repository -y ppa:qbittorrent-team/qbittorrent-stable
sudo apt update && sudo apt install -y qbittorrent
Telegram messenger¶
Download and run the official binaries.
Vivaldi browser¶
curl -fsSL https://repo.vivaldi.com/archive/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/vivaldi-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/vivaldi-keyring.gpg arch=amd64] https://repo.vivaldi.com/archive/deb/ stable main" | sudo tee /etc/apt/sources.list.d/vivaldi.list > /dev/null
sudo apt update && sudo apt install -y vivaldi-stable
Xanmod Linux kernel¶
Xanmod is a general-purpose Linux kernel distribution with custom settings and new features.
curl -fsSL https://dl.xanmod.org/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/xanmod-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/xanmod-keyring.gpg] http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list > /dev/null
sudo apt update && sudo apt install -y linux-xanmod
Nvidia GPU computing (CUDA)¶
The following section works for Ubuntu 22.04 LTS.
Install nvidia CUDA runtime and compatible GPU driver.
For Ubuntu 24.04:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin
sudo mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda-repo-ubuntu2404-12-6-local_12.6.0-560.28.03-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2404-12-6-local_12.6.0-560.28.03-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2404-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda
Add the CUDA compiler (nvcc
) to the system PATH
:
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
For WSL2, install Window NVIDIA GPU driver first; then install the CUDA toolkit in the WSL
# remove the old GPG key
sudo apt-key del 7fa2af80
# Install Linux CUDA toolkit
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt update && sudo apt install -y cuda
AMD and Intel open-source GPU library (Mesa)¶
Install the latest Mesa open source GPU drivers from the kisak PPA
sudo add-apt-repository -y ppa:kisak/kisak-mesa
sudo apt update && sudo apt full-upgrade -y
(Optional) Wine and 32-bit games support¶
sudo dpkg --add-architecture i386
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources
Update your system¶
sudo apt update && sudo apt full-upgrade -y
Install apps¶
Ubuntu¶
Save this list as pkgs.txt
# Development
git
git-lfs
# Network
cifs-utils
deluge
ssh
# System
nala
gnome-shell-extension-manager
parallel
baobab
synaptic
apt-xapian-index
zsh
ppa-purge
libfuse2
# Locale
ibus
ibus-chewing
# Media
ffmpeg
vlc
mcomix
viewnior
# Fonts
fonts-noto
fonts-wqy-microhei
fonts-wqy-zenhei
fonts-open-sans
ttf-mscorefonts-installer
Kubuntu¶
Kubuntu backports: Latest versions of KDE framework and APPs
sudo add-apt-repository -y ppa:kubuntu-ppa/backports
sudo apt-get update && sudo apt full-upgrade -y
Save this list as pkgs.txt
# Development
git
git-lfs
# Network
cifs-utils
qbittorrent
ssh
# System
parallel
zsh
kio-extras
gnome-keyring
kubuntu-restricted-extras
ppa-purge
# Locale
ibus
ibus-chewing
# Media
ffmpeg
smplayer
# Fonts
fonts-noto
fonts-wqy-microhei
fonts-wqy-zenhei
fonts-open-sans
Install packages¶
Run the following scripts to install packages
sudo -v
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sed 's/#.*$//' pkgs.txt | xargs sudo apt install -y
Configurations¶
Temporary files in RAM disk¶
Setting tmpfs
(RAM disk) for /tmp
folder:
sudo cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/
sudo systemctl enable tmp.mount
Disable Extended Security Maintenance (ESM)¶
sudo mv /etc/apt/apt.conf.d/20apt-esm-hook.conf /etc/apt/apt.conf.d/20apt-esm-hook.conf.disabled
Automatic updates¶
sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
Ubuntu: gnome shell extensions¶
- User themes
- Lock Keys
- Applications Menu : a category-based menu for applications.
- Dash to panel : an icon taskbar for Gnome Shell.
- Arc Menu an application menu for GNOME Shell
- Material shell tiling windows.
Kubuntu/KDE Neon: System Settings¶
- Double click to open files instead of single clicks:
Workspace behavior
=>General behavior
=>click behavior
. - Start with an empty session in
Desktop session
.