1. 커널 버전 확인
리눅스의 커널 버전은 다음과 같은 세 가지로 확인할 수 있다.
1) uname 이용
uname을 다음의 옵션과 같이 사용하면 여러 가지로 볼 수 있다.
$ uname -r
5.4.0-177-generic
$ uname -m
x86_64
$ uname -o
GNU/Linux
$ uname -o -r -m
5.4.0-177-generic x86_64 GNU/Linux
$ uname -a
Linux ShrimpServer 5.4.0-177-generic #197-Ubuntu SMP Thu Mar 28 22:45:47 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
2) hostnamectl 이용
$ hostnamectl
Static hostname: Server
Icon name: computer-vm
Chassis: vm
Machine ID: 7dd754155c37441f99add01c4ad19ef8
Boot ID: bbe7c575c0d545fda4f64eeac9387679
Virtualization: kvm
Operating System: Ubuntu 20.04.6 LTS
Kernel: Linux 5.4.0-177-generic
Architecture: x86-64
3) /proc/version
$ cat /proc/version
Linux version 5.4.0-177-generic (buildd@lcy02-amd64-112) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)) #197-Ubuntu SMP Thu Mar 28 22:45:47 UTC 2024
4) /etc/os-release
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
2. 가동시간 확인
1) uptime
$ uptime
20:53:21 up 17:53, 1 user, load average: 0.24, 0.09, 0.07
2) last reboot
$ last reboot
reboot system boot 5.4.0-177-generi Mon May 6 03:00 still running
reboot system boot 5.4.0-177-generi Mon Apr 29 03:00 - 03:00 (6+23:59)
reboot system boot 5.4.0-177-generi Mon Apr 22 03:00 - 03:00 (6+23:59)
reboot system boot 5.4.0-177-generi Sun Apr 21 01:48 - 03:00 (1+01:11)
reboot system boot 5.4.0-176-generi Sat Apr 20 22:58 - 01:48 (02:50)
wtmp begins Sun Dec 27 21:09:12 2020
리눅스 커널 버전, 가동시간 확인하기