Last active
March 14, 2023 14:08
-
-
Save rahulkrishnanfs/6c6ab0eaaa99244775c61b5a8532192a to your computer and use it in GitHub Desktop.
add-apt-repository for adding repository in /etc/apt/sources.list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We can add the repository url to the /etc/apt/sources.list using add-apt-repository | |
$ sudo apt-get install python-software-properties ---------------> Package name | |
#### Package will be available in https://packages.debian.org/jessie/admin/python-software-properties | |
example adding the docker repository to the debian sources.list | |
$ sudo add-apt-repository "deb https://apt.dockerproject.org/repo debian-$(lsb_release -cs) main" | |
Notes | |
---------------------- | |
$lsb_release -a | |
Output | |
----------------------- | |
----------------------- | |
### option -a --> All information | |
dev@ip-10-0-2-87:~# lsb_release -a | |
No LSB modules are available. | |
Distributor ID: Debian | |
Description: Debian GNU/Linux 8.6 (jessie) | |
Release: 8.6 | |
Codename: jessie | |
Options: | |
-c --> Get the code name of the currently installed distribution | |
---------------------------------------------------------------- | |
Example: | |
root@ip-10-0-2-87:~# lsb_release -c | |
Codename: jessie | |
-s --> Gives shot output format | |
--------------------------------- | |
Example: | |
root@ip-10-0-2-87:~# lsb_release -cs | |
jessie ----------------------------------------> Extract the code name of the distro | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment