# Debian

# Releases

Debian major versioncodenameRelease date
6.0Squeeze2011
7.0Wheezy2013
8.0Jessie2015
9.0Stretch2017
10.0Buster2019
11BullseyeNot yet

# Sid - The unstable distribution

The code name for Debian's development distribution is sid, aliased to unstable. Most of the development work that is done in Debian, is uploaded to this distribution. This distribution will never get released; instead, packages from it will propagate into testing and then into a real release.

Please note that security updates for unstable distribution are not managed by the security team. Hence, unstable does not get security updates in a timely manner. For more information please see the Security Team's FAQ.

sid is subject to massive changes and in-place library updates. This can result in a very unstable system which contains packages that cannot be installed due to missing libraries, dependencies that cannot be fulfilled etc. Use it at your own risk! sourceopen in new window

# Apt

Package manager

# Available package(s)

apt update
apt-cache search sendmail
apt-cache search --names-only 'icedtea?'
1
2
3

# Installed package version

apt show gitlab-ee | grep -i version
1

# Available versions

Show availables versions for a given package.

apt-cache madison curl

apt-cache madison gitlab-ee | grep 13.3.5-ee.0
 gitlab-ee | 13.3.5-ee.0 | https://packages.gitlab.com/gitlab/gitlab-ee/debian buster/main amd64 Packages
1
2
3
4

# Dependencies

Show dependencies for a given package

apt depends sendmail
1

# Clean cache

Clean cache space in /var/cache/apt/archives/

apt-get clean
1

# Pin version

cat /etc/apt/preferences.d/pin-gitlab-ee.pref
1
Explanation: Prefer GitLab provided packages over the Debian native ones
Package: gitlab-ee
Pin: version 13.3.5-ee.0
Pin-Priority: 1001
1
2
3
4

# GPG

Packages vendors provide some https endpoints to get package content. The ones acquired by apt install gitlab-ee.
Example for gitlab-ee the given official URL by gitlab is https://packages.gitlab.com/gitlab/gitlab-ee/debian/.
That's what we see in the apt source list config

cat /etc/apt/sources.list.d/gitlab_gitlab-ee.list 
# this file was generated by packages.gitlab.com for
# the repository at https://packages.gitlab.com/gitlab/gitlab-ee

deb https://packages.gitlab.com/gitlab/gitlab-ee/debian/ jessie main
deb-src https://packages.gitlab.com/gitlab/gitlab-ee/debian/ jessie main
1
2
3
4
5
6

But, to prove the ownership of their package, vendors sign them with GPG key.
For example gitlab enterprise edition GPG public key can be acquired here : https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey

That's why before beeing able to install them, you have to add vendor key into apt key store.

Example : Add gitlab-ee to apt key store

curl -L https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey | sudo apt-key add -
1

Example : Add yarn to apt key store

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
1

The vendor GPG public key is always easy to find on the vendor website under install or gpg section 😃

# Update-alternatives

Default system software (Debian)

 update-alternatives - maintain symbolic links determining default commands 
1

List existing selections and list the one you wanna see

update-alternatives --get-selections

update-alternatives --list x-www-browser
1
2
3

Modify existing selection interactively

sudo update-alternatives --config x-terminal-emulator
1

Create a new selection

update-alternatives --install /usr/bin/x-window-manager x-window-manager /usr/bin/i3 20
1

Change default terminal or browser will prompt you an interactive console to chose among recognized software

sudo update-alternatives --config x-terminal-emulator

sudo update-alternatives --config x-www-browser
1
2
3