Ubuntu foundations
Identify the system
Read the operating-system release, kernel, hostname, architecture, current user, and machine uptime before changing anything.
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)"
You should see something like host=webserver-01 user=ada. Run that one line before rm -rf, before reboot, before any bulk package change. It takes two seconds and prevents the classic mistake of running the right command on the wrong server. 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 on one Linux system: identify it with the commands above, then explain which command proves the distribution and which proves the architecture.
Lesson completed