Inspeccionar las fuentes de apt con cat /etc/apt/sources.list
En este paso, explorarás de dónde obtiene tu sistema sus paquetes de software. Cuando utilizaste sudo apt update
y sudo apt install htop
en el laboratorio anterior, apt
necesitaba saber de qué servidores descargar el software. Esta información se almacena en archivos de configuración.
El archivo principal que enumera las fuentes para apt
es /etc/apt/sources.list
. Podemos utilizar nuevamente el comando cat
para ver su contenido.
Escribe el siguiente comando en tu terminal y presiona Enter:
cat /etc/apt/sources.list
Verás líneas que comienzan con deb
o deb-src
. Estas líneas especifican los repositorios (servidores) donde apt
busca paquetes.
## See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
## newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted
## deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted
### Major bug fix updates produced after the final release of the
### distribution.
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
## deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
### N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
### team. Also, please note that software in universe WILL NOT receive any
### review or updates from Canonical except for security updates. The
### responsibility for security updates from this repository rests entirely
### with the community.
deb http://archive.ubuntu.com/ubuntu/ jammy universe
## deb-src http://archive.ubuntu.com/ubuntu/ jammy universe
... (output may vary)
Cada línea deb
generalmente sigue este formato:
deb [options] uri distribution [component1] [component2] [...]
deb
: Indica un repositorio de paquetes binarios.
uri
: La dirección del repositorio (por ejemplo, http://archive.ubuntu.com/ubuntu/
).
distribution
: El nombre en código de la distribución (por ejemplo, jammy
).
components
: Categorías de software (por ejemplo, main
, restricted
, universe
, multiverse
).
Las líneas que comienzan con #
son comentarios y son ignoradas por apt
.
Comprender sources.list
es importante si alguna vez necesitas agregar repositorios de terceros para instalar software que no está disponible en las fuentes predeterminadas.
Haz clic en Continuar para completar este paso.