debian — как узнать версию

Команды для получения версии debian (и, возможно, других систем)

cat /etc/issue

root:~# cat /etc/issue
Debian GNU/Linux 7 \n \l

lsb_release -a

root:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.1 (wheezy)
Release:        7.1
Codename:       wheezy
cat /etc/lsb-release # в debian не работает

cat /etc/debian_version

root:~# cat /etc/debian_version
7.1

inxi

inxi выдаёт в консоль много всякого. Но медленно-медленно. Например:

root@host:~# inxi -FnNi
System: Host: host Kernel: 3.16.0-6-amd64 x86_64 (64 bit) Console: tty 0 Distro: Debian GNU/Linux 8
Machine: System: HP product: ProLiant DL165 G7 serial: XXX11111XX
Mobo: N/A model: N/A Bios: HP v: O37 date: 08/10/2011
CPU: Quad core AMD Opteron 6128 (-HT-MCP-) cache: 2048 KB
Clock Speeds: 1: 800 MHz 2: 800 MHz 3: 800 MHz 4: 800 MHz 5: 800 MHz 6: 1200 MHz 7: 800 MHz
8: 800 MHz
Graphics: Card: Matrox Systems MGA G200e [Pilot] ServerEngines (SEP1)
Display Server: N/A driver: N/A tty size: 112×26 Advanced Data: N/A for root out of X
Network: Card-1: Intel 82576 Gigabit Network Connection driver: igb
IF: eth2 state: down mac: ff:ff:ff:ff:ff:ff
Card-2: Intel 82576 Gigabit Network Connection driver: igb
IF: eth3 state: down mac: ff:ff:ff:ff:ff:ff
Card-3: Intel 82576 Gigabit Network Connection driver: igb
IF: eth0 state: up speed: 1000 Mbps duplex: full mac: ff:ff:ff:ff:ff:ff
Card-4: Intel 82576 Gigabit Network Connection driver: igb
IF: eth1 state: up speed: 1000 Mbps duplex: full mac: ff:ff:ff:ff:ff:ff
WAN IP: 11.22.33.444 IF: bond0 ip: 111.22.33.444
IF: eth0 ip: N/A IF: eth1 ip: N/A IF: eth2 ip: N/A IF: eth3 ip: N/A
Drives: HDD Total Size: 4000.1GB (11.1% used) ID-1: /dev/sdb model: LOGICAL_VOLUME size: 2000.1GB
ID-2: /dev/sda model: LOGICAL_VOLUME size: 2000.1GB
Partition: ID-1: / size: 1.8T used: 794G (11%) fs: ext4 dev: /dev/sda1
ID-2: swap-1 size: 8.11GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
Sensors: System Temperatures: cpu: 25.6C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 151 Uptime: 7 days Memory: 249.6/3962.2MB Init: systemd runlevel: 5
Client: Shell (bash) inxi: 2.1.28

Даже умеет WAN IP определять. Но МЕДЛЕННО — в motd добавлять нельзя.

Ссылки

Linux Command To Find the System Configuration And Hardware Information
Get Linux System and Hardware Details on the Command Line

Leave a Reply