산출

산출

나는 가끔 데비안 버전 번호와 코드명을 잊어버립니다.
물론, lsb-release -a또는 cat /etc/os-release로그인한 현재 시스템에 대해 보기 좋은 형식의 정보를 인쇄합니다. 단, 다음과 같습니다.

이전 버전을 모두 나열하는 맨페이지나 도움말 문서가 있습니까?

(이상적으로는 "네이티브"이므로 도구를 설치할 필요가 없습니다. 상대적으로 기억하기 쉽기 때문에 curl웹 페이지가 필요하지 않습니다.)

나는 그 페이지를 찾지 못했고 man거기에서 뭔가를 찾을 수 있을 것이라고 생각했지만 /usr/share/doc불행히도 그렇지 않았습니다.

내가 찾은 것은 다음을 제공하는 Python 파일이었습니다.

grep 'Description: Debian' /usr/share/python-apt/templates/Debian.info
Description: Debian 11 'bullseye'
Description: Debian 10 'buster'
Description: Debian 9 'stretch'
Description: Debian 8 'jessie'
Description: Debian 7 'Wheezy' 
Description: Debian 6.0 'Squeeze' 
Description: Debian 5.0 'Lenny' 
Description: Debian 4.0 'Etch'
Description: Debian 3.1 'Sarge'
Description: Debian current stable release
Description: Debian testing
Description: Debian 'Sid' (unstable)

이것은 해결 방법으로 훌륭하지만 python-apt설치되는 패키지에 따라 다르며 이는 내가 원하는 것이 아닙니다.

편집하다:

/usr/share/distro-info/debian.csvubuntu.csv와 함께 이 파일을 찾아주신 @Gilles에게 감사드립니다.
이 파일에는 생성, 릴리스 및 "LTS 종료" 날짜도 포함되어 있어 거의 완벽합니다. 예:

...
9,Stretch,stretch,2015-04-25,2017-06-17,2020-07-06
...

답변1

Gilles Quenot이 말했듯이 이 정보가 포함된 매뉴얼 페이지는 없지만 패키지 distro-info는 다음을 표시할 수 있는 명령을 제공합니다.

$ distro-info -af
Debian 1.1 "Buzz"
Debian 1.2 "Rex"
Debian 1.3 "Bo"
Debian 2.0 "Hamm"
Debian 2.1 "Slink"
Debian 2.2 "Potato"
Debian 3.0 "Woody"
Debian 3.1 "Sarge"
Debian 4.0 "Etch"
Debian 5.0 "Lenny"
Debian 6.0 "Squeeze"
Debian 7 "Wheezy"
Debian 8 "Jessie"
Debian 9 "Stretch"
Debian 10 "Buster"
Debian 11 "Bullseye"
Debian 12 "Bookworm"
Debian 13 "Trixie"
Debian  "Sid"
Debian  "Experimental"

보다 구체적으로 debian-distro-infoDebian 버전이 나열되고 ubuntu-distro-infoUbuntu 버전이 나열됩니다. distro-info사용 중인 배포판에 적합한 것이 기본값입니다.

답변2

아니요 man page:

find /usr/share/man -exec zgrep -li 'Wheezy|Potato' {} + 2>/dev/null

아니요성냥.

한 가지 방법은 하나만 사용하십시오 awk.

awk -F, '{print $1, $2}' /usr/share/distro-info/debian.csv
version codename
1.1 Buzz
1.2 Rex
1.3 Bo
2.0 Hamm
2.1 Slink
2.2 Potato
3.0 Woody
3.1 Sarge
4.0 Etch
5.0 Lenny
6.0 Squeeze
7 Wheezy
8 Jessie
9 Stretch
10 Buster
11 Bullseye
12 Bookworm
13 Trixie
 Sid
 Experimental

을 위한 Ubuntu:

awk -F, '{print $1, $2}' /usr/share/distro-info/ubuntu.csv 
version codename
4.10 Warty Warthog
5.04 Hoary Hedgehog
5.10 Breezy Badger
6.06 LTS Dapper Drake
6.10 Edgy Eft
7.04 Feisty Fawn
7.10 Gutsy Gibbon
8.04 LTS Hardy Heron
8.10 Intrepid Ibex
9.04 Jaunty Jackalope
9.10 Karmic Koala
10.04 LTS Lucid Lynx
10.10 Maverick Meerkat
11.04 Natty Narwhal
11.10 Oneiric Ocelot
12.04 LTS Precise Pangolin
12.10 Quantal Quetzal
13.04 Raring Ringtail
13.10 Saucy Salamander
14.04 LTS Trusty Tahr
14.10 Utopic Unicorn
15.04 Vivid Vervet
15.10 Wily Werewolf
16.04 LTS Xenial Xerus
16.10 Yakkety Yak
17.04 Zesty Zapus
17.10 Artful Aardvark
18.04 LTS Bionic Beaver
18.10 Cosmic Cuttlefish
19.04 Disco Dingo
19.10 Eoan Ermine
20.04 LTS Focal Fossa
20.10 Groovy Gorilla
21.04 Hirsute Hippo
21.10 Impish Indri
22.04 LTS Jammy Jellyfish
22.10 Kinetic Kudu
23.04 Lunar Lobster

다른 방법:

xidel -se '//div[@id="toc"]/ul//li//li/a' \
    https://en.wikipedia.org/wiki/Debian_version_history | 
    cut -d ' ' -f2-

또는

curl -sL https://en.wikipedia.org/wiki/Debian_version_history |
     xmlstarlet format -H - 2>/dev/null |
     xmlstarlet sel -t -v '//div[@id="toc"]/ul//li//li/a' - |
     cut -d ' ' -f2-

산출

Debian 1.1 (Buzz)
Debian 1.2 (Rex)
Debian 1.3 (Bo)
Debian 2.0 (Hamm)
Debian 2.1 (Slink)
Debian 2.2 (Potato)
Debian 3.0 (Woody)
Debian 3.1 (Sarge)
Debian 4.0 (Etch)
Debian 5.0 (Lenny)
Debian 6.0 (Squeeze)
Debian 7 (Wheezy)
Debian 8 (Jessie)
Debian 9 (Stretch)
Debian 10 (Buster)
Debian 11 (Bullseye)
Debian 12 (Bookworm)

답변3

다른 훌륭한 답변 외에도 이제 gpg 키체인을 통해 다른 방법을 찾았습니다(이상합니다. ack이 방법은 찾지 못했지만 grep찾았습니다).

gpg 키링은 어디에서나 사용할 수 있으므로 이 방법은 구형 시스템에서도 작동합니다.

gpg /usr/share/keyrings/debian-archive-keyring.gpg |grep uid 
gpg /usr/share/keyrings/debian-archive-removed-keys.gpg |grep uid  # on the debian7 machine I tested, I had to leave out the "grep uid"

(키링의 구조가 다르기 때문에 우분투에서는 작동하지 않는 것 같습니다)

답변4

웹 브라우저를 열고 (이미 설치되어 있다고 가정합니다) 다음을 방문하십시오.https://en.wikipedia.org/wiki/Debian_version_history.

관련 정보