Can I get emplacement of `sources.list` in cmd on a Modified UNIX?

Viewed 16

i would like to know how can I get the path to sources.list on a modified UNIX which have apt and other base packages on it , like gpg and sudo. Does apt can identify the path to sources.list ?

He is using it , so he should be able to locate it, right ?

1 Answers

I don't know if this is the best way, but apt-config dump will show all of apt's configuration variables. On my system, the Dir::Etc variable gives the directory where the file is located, and Dir::Etc::sourcelist gives its name.

You can also read in the apt-config man page about the shell option which may be more useful for processing this data in a program.

Related