Glam Prestige Journal

Bright entertainment trends with youth appeal.

How do you enable these sources from the CLI? I cannot see which it is in /etc/apt/sources*

Software & Updates

5

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 restricted

Based 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 restricted

Line 16 has one component i.e., universe

deb bionic universe

Line 26 has one component i.e., multiverse

deb bionic multiverse

The 5th item in the attached pic, source code can be enabled by un-commenting the line number 6

# deb-src bionic main restricted

Observations:

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..

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy