Skip to main content
Notes by Peter Galonza(Пётр Галонза)
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

System information

Locale

Set global

localectl set-locale <locale variable>=<locale value>
vim /etc/locale.conf

Set for user

export <locale variable>=<locale value>

Print real and effective user and group IDs

id

Show who is logged on and what they are doing

w

Show list block devices

lsblk

Display information about the CPU architecture

lscpu

Show the topology of the system

lstopo

Display amount of free and used memory in the system

free -h

Show certain LSB (Linux Standard Base) and Distribution information.

lsb_release -a

Show distribution information.

cat /etc/*-release
cat /proc/version
cat /etc/issue

Show the status of modules in the Linux Kernel

lsmod

Show Posix IPC

ipcs -ma

Get distribution ID

https://unix.stackexchange.com/a/432819/440845

awk -F= '$1=="ID" { print $2 ;}' /etc/os-release | sed s/\"//g

Information about commands

command -v <command>
type <command>
type -t <command>
type -a <command>

Show the system shutdown entries and run level changes.

Information from

who -b
last -xF | head | tac
ausearch -i -m system_boot,system_shutdown | tail -4
journalctl --list-boots
journalctl -b <reboot id> -n
journalctl | grep -i "reboot\|shutdown"
grep -i "reboot\|shutdown" /var/log/messages

Show CPU caches

lscpu --caches

Collect all information about the system

Kaspersky collect information script

Limits

Get name and path byte limits

getconf -a | grep -i name_max
getconf -a | grep -i path_max

Documentation

/usr/share/doc

Time

View system time

timedatectl status

Memory

Memory use

cat /proc/meminfo

ps axo rss,comm,pid \
| awk '{ proc_list[$2]++; proc_list[$2 "," 1] += $1; } \
END { for (proc in proc_list) { printf("%d\t%s\n", \
proc_list[proc "," 1],proc); }}' | sort -n | tail -n 10 | sort -rn \
| awk '{$1/=1024;printf "%.0fMB\t",$1}{print $2}'

Udevadm

Show in realtime

udevadm monitor

Get attributes

udevadm info /dev/sdb1