add-apt-repository

From wikieduonline
Jump to navigation Jump to search

add-apt-repository is a python script included in software-properties-common package.

apt-add-repository -y ppa:ansible/ansible

add-apt-repository -y ppa:ethereum/ethereum


sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

Example[edit]

sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.netinch.com/pub/mariadb/repo/10.4/ubuntu bionic main'
Get:1 http://mirrors.digitalocean.com/ubuntu bionic InRelease [242 kB]
Hit:2 https://download.docker.com/linux/ubuntu bionic InRelease
Get:3 http://mirrors.digitalocean.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://mirrors.digitalocean.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://mirror.netinch.com/pub/mariadb/repo/10.4/ubuntu bionic InRelease [6244 B]
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:7 http://mirror.netinch.com/pub/mariadb/repo/10.4/ubuntu bionic/main arm64 Packages [11.3 kB]
Get:8 http://mirror.netinch.com/pub/mariadb/repo/10.4/ubuntu bionic/main amd64 Packages [11.7 kB]
Get:9 http://mirror.netinch.com/pub/mariadb/repo/10.4/ubuntu bionic/main ppc64el Packages [11.3 kB]
Fetched 535 kB in 1s (679 kB/s)
Reading package lists... Done
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
Repository: 'deb [arch=amd64] https://apt.releases.hashicorp.com jammy main'
Description:
Archive for codename: jammy components: main
More info: https://apt.releases.hashicorp.com
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Found existing deb entry in /etc/apt/sources.list.d/archive_uri-https_apt_releases_hashicorp_com-jammy.list
Adding deb entry to /etc/apt/sources.list.d/archive_uri-https_apt_releases_hashicorp_com-jammy.list
Found existing deb-src entry in /etc/apt/sources.list.d/archive_uri-https_apt_releases_hashicorp_com-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-https_apt_releases_hashicorp_com-jammy.list
Hit:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://us-west-2.ec2.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:4 https://apt.releases.hashicorp.com jammy InRelease [11.1 kB]
Hit:5 https://apt.releases.hashicorp.com hirsute InRelease
Get:6 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:7 https://apt.releases.hashicorp.com jammy/main amd64 Packages [65.1 kB]
Fetched 187 kB in 1s (288 kB/s)
Reading package lists... Done
W: https://apt.releases.hashicorp.com/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

Related commands[edit]

See also[edit]

Advertising: