갈루아의 반서재

Debian 버전을 체크하는 가장 간단한 방법은 /etc/issue 파일의 내용을 보는 것이다.

1
2
fuchsia@fuchsia:~$ cat /etc/issue
Debian GNU/Linux 9 \n \l
cs


하지만 상기 명령어는 현재 Debian 업데이트 포인트 릴리스를 보여주지 않는다. 따라서 좀 더 정확한 정보는 다음 명령을 통해서 살펴볼 수 있다.

1
2
fuchsia@fuchsia:~$ cat /etc/debian_version
9.6
cs


그리고 /etc/os-release release 파일을 통해서도 체크할 수 있다.

1
2
3
4
5
6
7
8
9
fuchsia@fuchsia:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
cs


systemd debian 버전의 경우 hostnamectl 을 사용할 수 있다.

1
2
3
4
5
6
7
8
9
10
11
fuchsia@fuchsia:~$ hostnamectl
   Static hostname: n/a
Transient hostname: fuchsia
         Icon name: computer-vm
           Chassis: vm
        Machine ID: abc8ebf4b9f5186e75cd5135a83d41ac
           Boot ID: 01269d7d8d37400eaa291c8179da9e58
    Virtualization: kvm
  Operating System: Debian GNU/Linux 9 (stretch)
            Kernel: Linux 4.9.0-8-amd64
      Architecture: x86-64
cs