컴퓨터

리눅스 커널 버전, 가동시간 확인하기

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: ubuntuvm
       Icon name: computer-vm
         Chassis: vm 🖴
      Machine ID: 
         Boot ID: 
  Virtualization: microsoft
Operating System: Ubuntu 2a.xy LTS                          
          Kernel: Linux 6.x.y-xy-generic
    Architecture: x86-64
 Hardware Vendor: QEMU
  Hardware Model: Standard PC _i440FX + PIIX, 1996_
Firmware Version: 
   Firmware Date: 
    Firmware Age: 

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 2a.xy LTS"
NAME="Ubuntu"
VERSION_ID="2a.xy"
VERSION="2a.xy"
VERSION_CODENAME=noble
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=noble
LOGO=ubuntu-logo

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

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다