Linux System Information - monkeymia/orangepizero GitHub Wiki

Linux System Information

After initial setup it might be helpful to get an overview about the target and operating system.

CPU Information

Example:

demonstrator@orangepizero:~$ lscpu
Architecture:        armv7l
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
Vendor ID:           ARM
Model:               5
Model name:          Cortex-A7
Stepping:            r0p5
CPU max MHz:         1200.0000
CPU min MHz:         240.0000
BogoMIPS:            120.00
Flags:               half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
demonstrator@orangepizero:~$

demonstrator@orangepizero:~$ cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 120.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5

processor       : 1
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 120.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5

processor       : 2
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 120.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5

processor       : 3
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 120.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5

Hardware        : Allwinner sun8i Family
Revision        : 0000
Serial          : 02c0004253b93432
demonstrator@orangepizero:~$

Debian package architecture

Debian fully supports three ports to different flavours of little-endian ARM hardware (https://www.debian.org/ports/arm/):

  • The ARM EABI (armel) port targets a range of older 32-bit ARM devices, particularly those used in NAS hardware and a variety of *plug computers.
  • The newer ARM hard-float (armhf) port supports newer, more powerful 32-bit devices using version 7 of the ARM architecture specification.
  • The 64-bit ARM (arm64) port supports the latest 64-bit ARM-powered devices.

Example:

demonstrator@orangepizero:~$ dpkg --print-architecture
armhf
demonstrator@orangepizero:~$

=> ARM Hard Float

Disk Space

df is a standard Unix command used to display the amount of available disk space for file systems on which the invoking user has appropriate read access.

Example:

demonstrator@orangepizero:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            211M     0  211M   0% /dev
tmpfs            50M  2.7M   47M   6% /run
/dev/mmcblk0p1   15G  766M   14G   6% /
tmpfs           247M     0  247M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           247M     0  247M   0% /sys/fs/cgroup
tmpfs           247M  4.0K  247M   1% /tmp
/dev/zram0       49M  816K   45M   2% /var/log
tmpfs            50M     0   50M   0% /run/user/1000
demonstrator@orangepizero:~$

Kernel Version

command uname provides system information about kernel.

Example:

demonstrator@orangepizero:~$ uname -a
Linux orangepizero 4.14.65-sunxi #68 SMP Tue Aug 21 19:57:06 CEST 2018 armv7l armv7l armv7l GNU/Linux
demonstrator@orangepizero:~$ uname -r
4.14.65-sunxi
demonstrator@orangepizero:~$  uname -m
armv7l
demonstrator@orangepizero:~$

Kernel Modules

list loaded kernel modules

demonstrator@orangepizero:~$ lsmod
Module                  Size  Used by
aes_arm_bs             20480  0
crypto_simd            16384  1 aes_arm_bs
cryptd                 20480  1 crypto_simd
ccm                    20480  6
lz4                    16384  20
lz4_compress           53248  1 lz4
sun8i_codec_analog     24576  0
xradio_wlan            94208  1
snd_soc_core          118784  1 sun8i_codec_analog
zram                   24576  5
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm                65536  2 snd_pcm_dmaengine,snd_soc_core
mac80211              446464  1 xradio_wlan
snd_timer              24576  1 snd_pcm
snd                    45056  3 snd_timer,snd_soc_core,snd_pcm
cfg80211              376832  2 mac80211,xradio_wlan
soundcore              16384  1 snd
rfkill                 20480  3 cfg80211
sun4i_gpadc_iio        16384  0
uio_pdrv_genirq        16384  0
uio                    16384  1 uio_pdrv_genirq
sch_fq_codel           20480  6
usb_f_acm              16384  1
u_serial               20480  3 usb_f_acm
g_serial               16384  0
libcomposite           40960  2 g_serial,usb_f_acm
ip_tables              20480  0
x_tables               20480  1 ip_tables
pwrseq_simple          16384  1

Network Default Gateway

If the default gateway does not point to eth0 (or what is used for internet) enter this in the terminal:

sudo route add default gw xxx.xxx.xxx.xxx dev [devicename]

where the x's are your gateway, your router at home or if you only have a modem the gateway designated by your internet service provider

Network Interface Configuration

ifconfig is a system administration utility in Unix-like operating systems for network interface configuration.

Example :

demonstrator@orangepizero:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
      inet 192.168.2.240  netmask 255.255.255.0  broadcast 192.168.2.255
      inet6 fe80::b39b:f6a5:d1df:2100  prefixlen 64  scopeid 0x20<link>
      ether 02:42:53:b9:34:32  txqueuelen 1000  (Ethernet)
      RX packets 1011  bytes 70265 (70.2 KB)
      RX errors 0  dropped 0  overruns 0  frame 0
      TX packets 864  bytes 51433 (51.4 KB)
      TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
      device interrupt 37

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
      inet 127.0.0.1  netmask 255.0.0.0
      inet6 ::1  prefixlen 128  scopeid 0x10<host>
      loop  txqueuelen 1000  (Local Loopback)
      RX packets 1050  bytes 84000 (84.0 KB)
      RX errors 0  dropped 0  overruns 0  frame 0
      TX packets 1050  bytes 84000 (84.0 KB)
      TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
      ether 12:42:53:b9:34:32  txqueuelen 1000  (Ethernet)
      RX packets 0  bytes 0 (0.0 B)
      RX errors 0  dropped 0  overruns 0  frame 0
      TX packets 0  bytes 0 (0.0 B)
      TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

OS identification

The /etc/os-release and /usr/lib/os-release files contain operating system identification data.

Example:

demonstrator@orangepizero:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
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"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
demonstrator@orangepizero:~$

System Memory Information

The file /proc/meminfo reports a large amount of valuable information about the system's RAM usage.

Example:

demonstrator@orangepizero:~$ cat /proc/meminfo
MemTotal:         505152 kB
MemFree:          346116 kB
MemAvailable:     438372 kB
Buffers:            8668 kB

Wifi Connect via commandline

Use Network Manager Text User Interface

nmtui

To make for example apt working the Network Default Gateway must be changed (from eth0 to your wlan0)

⚠️ **GitHub.com Fallback** ⚠️