Etc apt sources list kali linux

Статья Проверка и восстановление репозиториев в Kali Linux из командной строки

Вроде что-то и есть, но вроде и что-то не так. Чтобы было быстро и просто проверить состояние репозиториев, я написал вот такую длинную команду:

Решить эту проблему можно одной единственной командой:

Внимание, эта команда полностью затирает файл sources.list (в котором хранятся источники приложений). Т.е. если вы вручную туда что-то добавляли, то команда это сотрёт. Также удаляются комментарии, пустые строки и пр. – результатом команды является то, что в этот файл записываются две строчки — официальные источники приложений Kali.

Опять проверяю репозитории:

Можно опять проверить содержимое файла источников:

Отлично — всё есть и ничего лишнего.

После обновления репозитория, обязательно выполняем:

Pirnazar

The Codeby

ООО Кодебай

Подскажите, пожалуйста, что делать в данном случае?

WEBWARE TEAM
30.07.2015 в 09:29
Попробуйте так

О полученных результатах напишите, пожалуйста.

EZZE
22.12.2015 в 15:48
Вместо Для Kali 1.x добавляем репозитории для 2.х

У меня так сработало на версии Kali 1.1.0a

EZZE
22.12.2015 в 21:10
Наврал. При update && upgrade начал херню какую то гнать.

Нашел вот этот репозитории.

Работают.Испитания проводились на Kali 1.1.0a

SEEBAR
31.07.2015 в 13:55
К сожалению, опять всплыло это окошко и обновиться не получилось. Хоть жди версии 2.0

РАДИК
16.09.2015 в 05:46
Спасибо, автор красавчик. всё чотко и без понтов )))

KIDLUCK
04.10.2015 в 20:29
А обратно как вернуть, чтобы редактировать можно было?

ALEXEY
08.11.2015 в 20:03
Спасибо. Всё получилось.

АНДРЕЙ
08.03.2016 в 00:35
огромное спасибо, никакими методами не получалось, только Вашим все вышло с первого раза. Еще раз спасибо за подробную инструкцию

PWCPLE
14.05.2016 в 04:30
На сайте Kali рекомендуют добавить еще этот репозиторий:

Он появился начиная с 2016.1 версии. Они называют его самым лучшим.

А по сути, нельзя добавлять только kali dev.

PWCPLE
14.05.2016 в 04:31
Еще хотел добавить, что без него нельзя, например, установить aptitude.

OLEGON
20.05.2016 в 00:14
Весь день промучился сэтими репами, безрезультатно!
Но после прочтения этой статьи, все получилось с первого раза!
Огромное спасибо Автору! Доволен как слон!

ЕВГЕНИЙ
01.06.2016 в 10:51
У меня вылезла вот такая ошибка

У меня kali linux 2.0.На ubuntu наблюдал тоже самое.Ссылки не работают
Или не стоит волноватся раз они просто выключили несколько серверов?

OLEDVANT
07.01.2017 в 13:16
Всё сделал,как написано!Но вот что вылезло в конце!

Что делать?Как быть?

ULTRON
06.02.2017 в 13:49

Никак не могу настроить apt. Ругается, что пытаюсь загрузить по протоколу https и для него не установлен драйвер в то время, как в листе чётко прописал, что по http. Как это так странно получается?

TARIK
16.05.2017 в 11:46
leafpad

TARIK
16.05.2017 в 11:50

WIPE MEMORY
16.05.2017 в 23:30
Спасибо за инструкцию, помогло

MCSTL
24.08.2017 в 10:22
эта статья сподвигла меня написать авто-обновление репозитория, так что я начал осваивать bash, но написал я через переменные что дает возможность просто поменять адреса (dist 1-2) путь (way) и это подойдет к другой системе (это объясняет наличие sudo), я например заинтересовался backbox она легче и не подтормаживает на виртуальной машиyе и кажется с tor там все проще.

заливать ни куда не стал, можно просто создать файл в leafpad сохранить как угодно с расширением .sh например “123.sh” куда ни будь в Documents, а потом просто перейти в директорию cd

/Documents/; и запустить bash 123.sh, думаю при постоянных установках kali это достаточно удобно. вот код:

Источник

Etc apt sources list kali linux

The topic of repositories is always a large one, and comes up frequently. It is an item which people often get wrong and confused with. Please take the time to read the information below and any references which is linked to before acting on anything.

Default Network Repository Value

On a standard, clean install of Kali Linux, with network access, you should have the following entry present in /etc/apt/sources.list :

Читайте также:  Медиаплеер apple для windows

If the output doesn’t exactly match up to the above output, you may not be able to install any new additional packages or receive updates. This may happen for any number of reasons, such as:

  • You have switched your branch.
  • Using a different hardcoded mirror.

You will probably want to read the “switching branches” section to alter this.

Since Kali 2020.3, after Kali’s setup is complete, network repositories will be enabled by default, even if there was no network access during installation.

Switching Branches/Regular Repositories

Kali has various different branches to choose from (please take the time to read which one would be the best option for your setup), and you may be able to switch or include additional repositories.

kali-rolling (Default & frequently updated):

kali-last-snapshot (Point release so more “stable” & the “safest”):

kali-experimental (Packages which are under testing — often used with the rolling repository):

Sources.list Format

  • Archive is going to be deb (Regular Binary) or deb-src (Source), depending if you want a package or the source of the package.
  • Mirror should be http.kali.org/kali as this is our load balancer, which will direct you to best mirror.
  • Branch is what version of Kali you wish to use.
  • Component is what packages you wish to use, based on the Debian Free Software Guidelines (DFSG). Kali defaults to everything.

Default Offline Install Values

During the Kali setup process, if you don’t have access to a network connection to reach a repository, you will perform an offline installation of Kali Linux. You will be limited to the packages & the version which is on the medium you installed Kali from. This will then configure Kali to continue to use this medium to install packages from, even after Kali has been installed.

This means you will not get any updates to packages, or any new additional tools, which can be frustrating. You can see if you the offline media enabled if your values match up with whats below (or if you want to enable this option):

If your output matches whats above, please see the switching branch section, if you wish to receive updates.

However, if you do have network connection, which has access to network repositories, it will be enabled for you. You don’t need to do anything.

Non-Kali Repositories

If you want to install additional tools and software (such as signal) outside of what Kali has to offer, you may need to include an extra repository for this to happen. Please do not alter /etc/apt/sources.list , as this is used for the Kali Linux Operating System. Any extra tools and software needs to be placed into their own file in the directory /etc/apt/sources.list.d/ (such as /etc/apt/sources.list.d/repo-name.list , replacing repo-name with the mirror name). It is highly recommended that each mirror should be in its own file.

By adding Kali’s repository to a non-Kali OS (such as trying to add Kali to Ubuntu), this will highly increase the chance of your system not working. It may not happen straight away, but without any warning, it may break. We will not be able to offer support (and based on what we have seen over the years, most other OS will not help too).

Likewise, adding other operating system’s repositories into Kali (such as trying to put Ubuntu on Kali), will break your installation. This is the single most common reason why Kali Linux systems break.

If any guides are telling you to do anything else than the above, this is unofficial advice, and completely not supported by Kali Linux. More often than not, users in this case end up doing a reinstall after learning this lesson.

Mirrors

We have a list of official Kali Linux mirrors, as well as a guide on how to setup your own. This may be kept as a local repository which is only accessible on a LAN, or a remote private one, or if you have the ability to, you may wish to share back to the community and make it public allowing for anyone else in your geographical area to benefit from it.

Читайте также:  Internet connection firewall and windows firewall

Source Repositories

By using a deb in the repositories, it will allow for binary packages to be downloaded. However, should you require the source to a package (so you can compile the package yourself if you so wish, or look into debugging a problem with a package), you can add deb-src as a extra line in the repositories.

We used kali-rolling for the branch above, but you can select any value you wish.

Updated on: 2021-Sep-27
Author: g0tmi1k

Источник

Advanced Package Management in Kali Linux

The Advanced Package Tool (APT) is how programs, libraries, documentation, and even the kernel itself are installed and managed on Kali and other Debian-based derivatives. APT often works so well that many users don’t pay any particular attention to it other than to perhaps search for and install programs and (hopefully) update their system regularly.

For most standard users, making use of APT this way is perfectly normal but we like to think that people who use Kali Linux are not standard users (in a good way) and so we are devoting this post to telling how you to get better use of APT and how to take advantage of the wide ecosystem of packages that are available, while keeping your Kali system stable and happy.

Many people will tell you that you should not rely on a package manager at all and instead, you should compile everything from scratch because you will learn more that way. While it’s certainly true that you will learn a lot, especially as you start out, building everything by hand will quickly devolve into tedium when you could be spending your time hacking or learning something new, preferably both.

In this post, we’ll show you how you can safely add additional package repositories to your Kali installation, how to upgrade and downgrade them, and how to ensure all of these repositories live in harmony. APT is very powerful and will evaluate the available packages from all sources as a whole when it formulates its solutions.

Adding Package Sources to Kali Linux

If you want to make your future self happy, you should not directly edit /etc/apt/sources.list directly. For each new package repository you add to your system, create a new file with a descriptive name (like debian-unstable.list) under /etc/apt/sources.list.d/. By leaving the original sources.list file untouched, if Kali needs to update it, it won’t interrupt you during the update, asking you which version of the file to keep.

In this post, we are going to add the Kali Bleeding-Edge repository and the Debian Unstable and Experimental repositories.

The kali-bleeding-edge Repository

The kali-bleeding-edge repository contains a number of tools that are very popular and change very frequently (even daily). It would be impractical and time-consuming to manually create and test updated packages so the packages in this repository are generated automatically whenever the upstream source changes. On the positive side, it means you are never more than 24 hours behind the upstream project but on the downside, these packages are not tested so you need to be aware that the packages in this repository may break from time to time.

You can add the repo and update the list of available packages as follows.

To install a package from kali-bleeding-edge, you need to append the repository name to the package name:

Fortunately, APT makes it an easy to downgrade back to the kali-rolling version of a particular package at any time, so there is no need to fear the packages in the kali-bleeding-edge repository. If you find that a package is broken in kali-bleeding-edge, you can revert back to the kali-rolling version in the same manner:

The Debian Unstable and Experimental Repositories

Kali Linux is a derivative of Debian Testing, which has more up-to-date software than Debian Stable. For even more recent software, there is the Debian Unstable distribution, which is a rolling development version of Debian, containing the most recent packages. When you encounter a bug in a Debian package, there might be a fixed version in the Debian Unstable repository so it is a good idea to add it to your Kali system. As with kali-bleeding-edge, the packages in Unstable may break from time to time.

Читайте также:  Split text file in linux

Debian Experimental is yet another repository that contains packages that are under development. The packages in this repository are very current but can also be very buggy, more so than kali-bleeding-edge or Debian Unstable. APT will only install packages from this repository if you explicitly request them and you can always downgrade if things don’t work out.

As with the kali-bleeding-edge packages, if you want to install packages from unstable or experimental, append the repository name to the end of the package name as shown below.

Determining Package Priorities

In order to determine what packages get installed, APT has priorities assigned for all package sources, with the highest priority number taking precedence. A package with a priority of 0 will never be installed and a package with a priority over 1000 will always be installed, even if it means downgrading the package.

This is all well and good for APT but how can you, the user, see what the priority is of a given package? Enter the little-known ‘apt-cache’ command and its ‘policy’ option, which displays all of your configured repositories and their priorities.

You will note that kali-rolling, as the default distribution, has the highest priority at 990, meaning its packages take precedence over all others (which is what you want as a Kali user), followed by Debian unstable at 500, kali-bleeding-edge at 100, and lastly, experimental, with a lowly priority of 1. To see how these priorities apply to a given package, take a look at sqlmap.

Even though the version of sqlmap in kali-bleeding-edge is newer, it will not be installed because it only has a priority of 100, versus the installed version, which has a priority of 990. It is for this reason that when you want to install a package from a different package repository, it needs to be requested explicitly.

APT Configuration

Setting the Default Distribution

Now that you have some extra repositories added to your system, you will want to begin exploring and installing new packages, but before you do, it’s a good idea to tell APT what your default distribution is, which for Kali Linux users, is “kali-rolling”. This way your system won’t upgrade to some other distribution without your consent. Configure your default distribution by adding “APT::Default-Release “kali-rolling”;” to /etc/apt/apt.conf.d/local.

With your default distribution configured, any time you run ‘apt full-upgrade’, it will apply the upgrade to kali-rolling, helping keep your system stable.

Reducing Upgrade Prompts

If you use any Debian derivative for a significant amount of time, you will come across a prompt while running ‘apt upgrade’ asking you about a configuration file and whether you want to keep the local version, use the new version, or compare them. More often than not, you will find yourself accepting the default, making these interruptions wasteful.

You can avoid these prompts by updating your /etc/apt/apt.conf.d/local file with ‘DPkg::options < “–force-confdef”; “–force-confold”; >’ as shown below. This line tells APT to try to choose by itself if the files have not changed (–force-confdef) and if the files are different, keep the existing version (–force-confold).

Pinning Package Versions

Occasionally, you will find some application that needs a specific version of a particular package and will not work with any other. Other times, an update to one package might adversely affect other tools. This happened to us recently with an update to the devscripts package, which was preventing us from building Kali packages.

Fortunately, APT allows you to pin a package to a particular version by setting its priority to 1001 in /etc/apt/preferences. For example, to tell APT to hold the devscripts package at version 2.16.x, you would add the following.

Additional Resources

In this post, we have only been able to scratch the surface of how you can extend APT far beyond the default Kali or Debian ecosystem. The solver algorithms are very effective and running into issues is rare, so you need not fear exploring other repositories. To learn more about APT and how to bend it to your will, we encourage you to refer to Kali Linux Revealed and The Debian Administrator’s Handbook, both of which contain a wealth of information, tips, and tricks.

Источник

Оцените статью