在Ubuntu系統中,可以通過編輯 `/etc/apt/sources.list` 文件來配置軟件源。打開終端,輸入以下命令:
```
sudo nano /etc/apt/sources.list
```
在打開的文件中,可以看到已經配置的軟件源。可以根據需要注釋或者取消注釋相應的源。
常用的軟件源包括官方源、阿里云源、清華大學源等。
官方源配置示例:
```
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
```
阿里云源配置示例:
```
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
```
配置完成后,保存文件并退出編輯器。然后在終端中執行以下命令更新軟件源:
```
sudo apt update
```
現在,系統的軟件源已經配置完成。可以使用 `apt` 命令安裝、更新、卸載軟件包了。