Шукати в цьому блозі

вівторок, 10 липня 2018 р.

Як визначити дистрибутив та версію Linux?

В принципі Linux це ядро, але знати версію ядра це не еквівалент того, що ми одразу можемо дізнатися щось про дистрибутив системи. А от у останньому допоможе пакет inxi.
Запускаємо:
inxi -S
і дізнаємося дещо значно більше ніж просто про версію ядра.
$ inxi -S
System:    Host: askue Kernel: 2.6.32-573.22.1.el6.x86_64 x86_64 bits: 64 Console: tty 2
           Distro: CentOS release 6.7 (Final)
або
$ inxi -S
System:    Host: olden Kernel: 4.9.0-7-amd64 x86_64 (64 bit) Desktop: Cinnamon 3.2.7
           Distro: Debian GNU/Linux 9 (stretch)
Але й це не все, про систему можна та "залізо" можна дізнатися більше якщо запустити inxi з параметром -F:

$ inxi -F
System:    Host: askue Kernel: 2.6.32-573.22.1.el6.x86_64 x86_64 bits: 64 Console: tty 2
           Distro: CentOS release 6.7 (Final)
Machine:   Device: server System: Supermicro product: X10DRH v: 123456789 serial: 123456789
           Mobo: Supermicro model: X10DRH-C v: 1.01 serial: NM15AS011867
           UEFI [Legacy]: American Megatrends v: 2.0 date: 12/17/2015
CPU(s):    2 6 core Intel Xeon E5-2620 v3s (-MT-MCP-SMP-) cache: 30720 KB
           clock speeds: max: 2399 MHz 1: 2399 MHz 2: 2399 MHz 3: 2399 MHz 4: 2399 MHz 5: 2399 MHz 6: 2399 MHz
           7: 2399 MHz 8: 2399 MHz 9: 2399 MHz 10: 2399 MHz 11: 2399 MHz 12: 2399 MHz 13: 2399 MHz 14: 2399 MHz
           15: 2399 MHz 16: 2399 MHz 17: 2399 MHz 18: 2399 MHz 19: 2399 MHz 20: 2399 MHz 21: 2399 MHz
           22: 2399 MHz 23: 2399 MHz 24: 2399 MHz
Graphics:  Card: ASPEED ASPEED Graphics Family
           Display Server: N/A driver: N/A tty size: 211x53 Advanced Data: N/A for root out of X
Network:   Card-1: Intel I350 Gigabit Network Connection driver: igb
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: 0c:c4:7a:6c:de:ce
           Card-2: Intel I350 Gigabit Network Connection driver: igb
           IF: eth1 state: up speed: 1000 Mbps duplex: full mac: 0c:c4:7a:6c:de:cf
Drives:    HDD Total Size: 1999.3GB (0.2% used)
           ID-1: /dev/sda model: SMC3108 size: 1999.3GB
Partition: ID-1: / size: 9.5G used: 1.5G (17%) fs: ext4 dev: /dev/dm-0
           ID-2: /boot size: 477M used: 57M (13%) fs: ext4 dev: /dev/sda1
           ID-3: swap-1 size: 1.07GB used: 0.00GB (0%) fs: swap dev: /dev/dm-1
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: No active sensors found. Have you configured your sensors yet? mobo: N/A
Info:      Processes: 478 Uptime: 314 days Memory: 573.9/15838.4MB Init: Upstart runlevel: 3
           Client: Shell (bash) inxi: 2.3.56 
$ inxi -F
System:    Host: olden Kernel: 4.9.0-7-amd64 x86_64 (64 bit) Desktop: Cinnamon 3.2.7
           Distro: Debian GNU/Linux 9 (stretch)
Machine:   Device: desktop Mobo: ASUSTeK model: P5Q SE PLUS v: Rev 1.xx BIOS: American Megatrends v: 2204 date: 08/28/2009
CPU:       Quad core Intel Core2 Quad Q8300 (-MCP-) cache: 2048 KB 
           clock speeds: max: 2499 MHz 1: 2003 MHz 2: 2003 MHz 3: 2003 MHz 4: 2003 MHz
Graphics:  Card: NVIDIA G73 [GeForce 7600 GS]
           Display Server: X.Org 1.19.2 driver: nvidia Resolution: 1920x1080@60.00hz, 1920x1080@60.00hz
           GLX Renderer: GeForce 7600 GS/PCIe/SSE2 GLX Version: 2.1.2 NVIDIA 304.137
Audio:     Card Intel 82801JI (ICH10 Family) HD Audio Controller driver: snd_hda_intel
           Sound: Advanced Linux Sound Architecture v: k4.9.0-7-amd64
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: 20:cf:30:19:46:f7
Drives:    HDD Total Size: 2320.5GB (35.7% used)
           ID-1: /dev/sdb model: WDC_WD20EFRX size: 2000.4GB
           ID-2: /dev/sda model: SAMSUNG_HD321KJ size: 320.1GB
Partition: ID-1: / size: 9.1G used: 3.1G (36%) fs: ext4 dev: /dev/sda1
           ID-2: /usr size: 14G used: 11G (79%) fs: ext4 dev: /dev/sda6
           ID-3: /home size: 184G used: 161G (93%) fs: ext4 dev: /dev/sda5
           ID-4: /var size: 74G used: 13G (18%) fs: ext4 dev: /dev/sda7
           ID-5: /tmp size: 11G used: 29M (1%) fs: ext4 dev: /dev/sda9
           ID-6: swap-1 size: 3.00GB used: 0.08GB (3%) fs: swap dev: /dev/sda8
Sensors:   System Temperatures: cpu: 35.5C mobo: 47.0C gpu: 71C
           Fan Speeds (in rpm): cpu: 2220 psu: 0 sys-1: 1117
Info:      Processes: 281 Uptime: 1:03 Memory: 3754.7/7987.1MB Client: Shell (bash) inxi: 2.3.5 
ну й не забуваймо про
man inxi
А ще можна уважно подивитися у бік:
$ cat /etc/*-release
$ cat /etc/issue

Немає коментарів: