This article is based on a real installation and configuration process of Ubuntu 26.04 on a ThinkPad T570. All commands are actual operation records, including some failed attempts and explanations, aiming to provide a complete and reproducible initialization guide.
Right after installing the system, to improve download speeds, I first attempted to replace the official source with the Alibaba Cloud mirror. I executed the following command:
This indicates that the software source actually in use is already the Tsinghua University TUNA mirror, rather than the official source or the Alibaba Cloud source. Why did the sed command not take effect? I checked the contents of /etc/apt/sources.list:
Bash
cat/etc/apt/sources.list
The output was:
Plaintext
# Ubuntu sources have moved to /etc/apt/sources.list.d/ubuntu.sources
It turns out that starting from Ubuntu 24.04, the APT source configuration migrated to the DEB822 format. The traditional sources.list file has been deprecated, and the actual configuration is located at /etc/apt/sources.list.d/ubuntu.sources. I viewed this file:
Bash
cat/etc/apt/sources.list.d/ubuntu.sources
The output was:
Plaintext
Types: debURIs: http://cn.archive.ubuntu.com/ubuntu/Suites: resolute resolute-updates resolute-backportsComponents: main restricted universe multiverseSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpgTypes: debURIs: http://security.ubuntu.com/ubuntu/Suites: resolute-securityComponents: main restricted universe multiverseSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
As you can see, the official source address is cn.archive.ubuntu.com (China region CDN mirror), yet apt update showed that data was being fetched from mirrors.tuna.tsinghua.edu.cn. This is because Ubuntu’s cn.archive.ubuntu.com domain automatically redirects via DNS or HTTP to the fastest domestic mirror site (in this case, the Tsinghua source). Therefore, a fresh installation of Ubuntu 26.04 has already automatically obtained a high-speed domestic mirror, so there is no need to manually change the source.
The aforementioned sed command failed to take effect for two reasons: first, it modified the wrong file (sources.list is deprecated); second, even if the correct DEB822 file were modified, the original string archive.ubuntu.com does not exist in the current configuration. If you still wish to force the use of a specific mirror (such as Alibaba Cloud), you can edit /etc/apt/sources.list.d/ubuntu.sources, replace URIs: http://cn.archive.ubuntu.com/ubuntu/ with URIs: http://mirrors.aliyun.com/ubuntu/, and then execute sudo apt update. Considering that the existing automatic redirection mechanism is already quite fast, I kept the default configuration and proceeded with the subsequent steps.
2. System Update and Package Upgrade
Execute the update and upgrade all installed packages:
Bash
sudoaptupdate && sudoaptupgrade-y
The output showed:
Hit the Tsinghua source, security source, etc.
12 packages can be upgraded (including base-files, gnome-control-center, snapd, etc.)
Download size 45.3 MB, automatically installed
Meanwhile, the system prompted that there are old kernel packages (such as linux-headers-7.0.0-14) that are no longer needed, which will be cleaned up later.
Sample upgrade output:
Plaintext
Setting up gnome-control-center (1:50.0-0ubuntu6.1) ...update-initramfs: Generating /boot/initrd.img-7.0.0-15-generic
3.2 Trying the Outdated autoinstall Command (Failed)
Bash
sudoubuntu-driversautoinstall
Error reported:
Plaintext
Error: No such command 'autoinstall'.
This indicates that the new version of ubuntu-drivers has deprecated autoinstall; install should be used instead.
3.3 Using the Correct Installation Command
Bash
sudoubuntu-driversinstall
After execution, the system prompted:
Plaintext
All the available drivers are already installed.
This means the NVIDIA driver was already present in the system, and there was no need to install it again. Why would a fresh Ubuntu installation come with the NVIDIA proprietary driver?
This is closely related to the options selected during system installation. During the Ubuntu 26.04 installation process, there is an interface titled “Install recommended proprietary software?”, which contains two key options:
“Install third-party software for graphics and Wi-Fi hardware” – The text below this option explicitly states: “Includes but is not limited to NVIDIA drivers and similar software.” If checked, the installer will automatically detect hardware (such as NVIDIA graphics cards, Broadcom wireless network cards, etc.) and download and install the corresponding proprietary drivers from the software sources.
“Download and install support for additional media formats” – This option installs multimedia decoders (such as MP3, H.264, etc.), which is unrelated to graphics drivers but is usually checked by users along with the previous option.
Because “Install third-party software for graphics and Wi-Fi hardware” was checked during this installation, the system automatically completed the deployment of the NVIDIA GeForce 940MX driver during the installation process. Therefore, the ubuntu-drivers install command run after installation prompted “All the available drivers are already installed.”
💡 Note: Even if this option was not checked during installation, you can manually run sudo ubuntu-drivers install or sudo apt install nvidia-driver-580 after the system installation to install the driver. Both methods achieve the same result.
4. Enabling the Firewall
Bash
sudoufwenable
Output:
Plaintext
Enabling and activating the firewall at system startup
Basic security protection has been enabled.
5. Installing Common Software and Multimedia Support
Install git, curl, vim, htop, unzip, and ubuntu-restricted-extras (multimedia decoders + Microsoft fonts):
The system will automatically install dependency packages such as cabextract, git-man, liberror-perl, libmspack0t64, ttf-mscorefonts-installer, unrar, and vim-runtime.
5.2 Accepting the Microsoft Font EULA
When installing ttf-mscorefonts-installer, a license agreement window will pop up. As shown in the figure below, the full EULA text is displayed first:
Then an acceptance dialog box appears, with “No” highlighted by default:
Operation method: Use the Tab key to move the highlight to “OK” or “Yes”, and then press Enter to confirm. Afterward, all fonts (Andale, Arial, Times New Roman, etc.) are automatically downloaded and extracted.
5.3 Font Download and Installation Process
The terminal output showed that 11 .exe files were being downloaded from SourceForge, and cabextract was used to extract the TrueType fonts. Finally, it prompted:
Plaintext
All fonts downloaded and installed.
6. Cleaning Up Old Kernels and Dependencies
According to the system prompt, remove the old kernel packages that are no longer needed:
Bash
sudoaptautoremove-y
Packages to be removed:
linux-headers-7.0.0-14
linux-image-unsigned-7.0.0-14-generic
linux-modules-7.0.0-14-generic
And 7 packages in total
This frees up approximately 319 MB of space. At the same time, GRUB updated automatically and detected the Windows Boot Manager (the dual-boot entry was preserved).
7. Verifying the Final State of the Graphics Driver
Run nvidia-smi again to confirm the driver is working properly:
Plaintext
Tue May 26 20:03:04 2026 +-----------------------------------------------------------------------------------------+| NVIDIA-SMI 580.159.03 Driver Version: 580.159.03 CUDA Version: 13.0 || 0 NVIDIA GeForce 940MX Off | 00000000:02:00.0 Off | N/A || N/A 46C P8 N/A / 200W | 4MiB / 2048MiB | 0% Default |+-----------------------------------------------------------------------------------------+
8. Installing Chinese Input Method (IBus Pinyin)
Bash
sudoaptinstallibus-libpinyin
The system prompted that it is already the latest version. After installation, the input method framework needs to be configured.
8.1 Selecting the Input Method Framework
Open the “Language Support” window to switch the keyboard input method system. The figure below shows the Fcitx5 framework:
However, Ubuntu officially recommends using IBus, especially for complex input methods like Chinese and Japanese:
Since we installed ibus-libpinyin, ensure that the “Keyboard input method system” is set to IBus (as shown in the figure above). Afterwards, log out of the current session and log back in, then add “Chinese (Intelligent Pinyin)” under “Settings → Keyboard → Input Sources”. Press Windows + 空格 to switch between Chinese and English input.
I initially installed the IBus Pinyin input method (ibus-libpinyin), and I could type Pinyin normally using Win + Space. However, Pinyin input was not efficient enough for me, and I prefer a mixed Wubi-Pinyin input mode, so I decided to switch to the Fcitx5 framework. I executed the following command to install Fcitx5 and its Chinese plugins:
Bash
sudoaptinstallfcitx5fcitx5-chinese-addons
Typical output after execution is as follows (if already installed, it will prompt that it is the latest version):
Plaintext
Reading package lists... DoneBuilding dependency tree... Donefcitx5 is already the newest version (5.1.7-1ubuntu1).fcitx5-chinese-addons is already the newest version (5.1.6-1ubuntu1).0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
After installation, open the Fcitx5 configuration tool (fcitx5-configtool), and add “Wubi-Pinyin” in the “Input Method” tab to start using it.
Under the default Wayland display server, Fcitx5 usually runs perfectly fine (this is the case on my ThinkPad T570). If you encounter compatibility issues such as the candidate box not following the cursor, you can log out and switch to an Xorg session (click the gear icon on the login screen and select “Ubuntu on Xorg”).
9. Configuration Summary and Follow-up Suggestions
After executing all the above commands, the system status is as follows:
Item
Status
Software Source
Default mirror (domestic high-speed)
System Packages
All up to date (12 packages upgraded)
Old Kernel
Cleaned up, 319MB freed
NVIDIA Driver
580.159.03, CUDA 13.0, working normally
Firewall
Enabled
Basic Tools
git, curl, vim, htop, unzip installed
Multimedia Support
Decoders + Microsoft fonts installed
Chinese Input Method
ibus-libpinyin available
Optional Follow-up Optimizations (I did not perform any of the following operations)
Development Environment: Python (python3-pip, python3-venv), Node.js, Docker, etc.
Disable Ubuntu Pro Prompt: sudo pro config set apt_news=false
Conclusion
This article documents the complete command-line operations from post-installation to getting the system ready, including failed attempts and correct solutions. I hope this guide, compiled from real operations, helps you quickly configure your own Ubuntu environment. If you encounter any issues during the configuration process, feel free to troubleshoot by comparing with the steps and screenshots in this article.