Ubuntu foundations
Identify the system
Read the operating-system release, kernel, hostname, architecture, current user, and machine uptime before changing anything.
8 minute lesson
Before changing an unfamiliar machine, identify what you are connected to. A hostname in the prompt is not enough: two servers can have similar names and very different operating-system versions.
Start with the operating-system release:
cat /etc/os-release
Then collect the kernel, architecture, hostname, current account, and uptime:
uname -r
uname -m
hostnamectl
whoami
uptime
These commands answer different questions:
/etc/os-releaseidentifies the distribution and release.uname -rshows the running kernel.uname -mshows the hardware architecture, such asx86_64oraarch64.hostnamectlshows the configured hostname and system details.whoamiconfirms which account will run the next command.uptimeshows how long the machine has been running and its load averages.
Why this matters
A package name can differ between releases. A downloaded binary built for x86_64 will not run on an ARM server. A reboot may have loaded a different kernel than the one you expected.
Also verify the target before a destructive or administrative command:
printf 'host=%s user=%s\n' "$(hostname)" "$(whoami)"
Do not include secrets, private IP addresses, or customer data in a public bug report. Include only the system facts needed to reproduce the problem.
Create a small diagnostic block
When asking for help, a useful report might contain:
Ubuntu: 24.04 LTS
Kernel: 6.x
Architecture: x86_64
Service: notes-api.service
Started failing: after package update
The exact versions will vary. The important part is replacing assumptions with observed facts.
Try this: identify one Linux system, then explain which command proves the distribution and which proves the architecture.
Lesson completed