Skip to content

Linux & shell: System info

9 Linux & shell commands: System info. Click a command to see what each part does.

Index
9 items
Click a command to see what each part does.

System info9

  • uname -aKernel and architecture

    What each part does

    1. unamesystem information
    2. -aall: kernel name, hostname, release, version, architecture
  • cat /etc/os-releaseWhich Linux distribution and version?

    What each part does

    1. /etc/os-releaseNAME, VERSION_ID, ID of the distro (ubuntu, debian, rhel…)
  • hostname; hostname -IHost name and IP addresses

    What each part does

    1. hostnamethe machine name
    2. -Iall IP addresses of the host
  • uptimeHow long has it been running? Load?

    What each part does

    1. uptimetime since boot, logged-in users, load average over 1/5/15 minutes
  • date; timedatectlDate, time and timezone

    What each part does

    1. datecurrent date and time
    2. timedatectltimezone and whether NTP sync is active
  • nproc; lscpuCPU cores and model

    What each part does

    1. nprocnumber of CPUs available
    2. lscpuCPU model, cores, threads, architecture
  • lsblkDisks and partitions

    What each part does

    1. lsblkblock devices as a tree: disks, partitions, sizes, mount points
  • findmntWhat is mounted where

    What each part does

    1. findmntmounted filesystems as a tree (cleaner than mount)
  • sudo reboot; sudo shutdown -h nowReboot / shut downDestructive

    What each part does

    1. rebootrestart the machine
    2. shutdown -h now-h = halt/power off, now = immediately (or +10 for 10 minutes)

My DevOps Playbook by Angelo John Calleja

New runbook

GitHub not connected

Saving is handled by the site: the GitHub token is stored in Cloudflare, not in your browser. Enter the editor password (the EDITOR_PASSWORD secret) to unlock saving in this browser.

Saving commits to gelogrammer/My_DevOps_Playbook. Create a fine-grained token with access to only this repo andContents: Read and write, then paste it here. It is stored only in this browser.

src/content/docs/…