How do you enable these sources from the CLI? I cannot see which it is in /etc/apt/sources*
1 Answer
According to man sources.list the main paragraph underTHE DEB AND DEB-SRC TYPES: GENERAL FORMAT and some examples in it says
As an example, the sources for your distribution could look like this in one-line-style format: deb xenial main restricted deb xenial-security main restricted deb xenial-updates main restricted or like this in deb822 style format: Types: deb URIs: Suites: xenial xenial-updates Components: main restricted Types: deb URIs: Suites: xenial-security Components: main restrictedBased on above:
and from the unedited /etc/apt/sources.list file from Ubuntu 18.04
Line 5 has two components i.e., main and restricted.
deb bionic main restrictedLine 16 has one component i.e., universe
deb bionic universeLine 26 has one component i.e., multiverse
deb bionic multiverseThe 5th item in the attached pic, source code can be enabled by un-commenting the line number 6
# deb-src bionic main restrictedObservations:
When you tick and untick these tick marks via GUI, the file /etc/apt/sources.list lines may vary.. like they dont uncomment the line, Instead they will add other line with some comment etc..
If you dont change those settings with GUI, you can always edit the file with scripts with constant line numbers..
So be careful with your scripts while defining the line numbers..