You have been given access to a server, and the ticket says "Ubuntu 24.04". Before you start working, ask the machine itself what system it is.
The server here is the trainer's practice machine: commands run on it, and your own computer is not touched.
What the system calls itself
Ask the system about itself with two commands: each prints the system's name and its release number. The line No LSB modules are available. is a service message from lsb_release; it has nothing to do with the release.
First, predict
The machine runs Ubuntu 24.04. What will the first command, uname -sr, print?
Now start the exercise, run the command and compare your prediction with the output.
Why do the two commands name the same machine differently?
-
Both commands went into one terminal, one after the other, and it is connected to one training machine.
-
Both commands ask the running system and print its current numbers. Linux is not Ubuntu's old name: both names exist in the system at the same time.
-
Someone starts a browser, but you never started Ubuntu:
lsb_release -dsnamed the system that was already running when you logged in.
uname reports on the kernel, which is called Linux, and lsb_release on Ubuntu, the distribution built around that kernel.