To obtain operating system details from the Linux command line interface (CLI), you can use the lsb_release
command or the uname
command. Here’s how you can use both of these commands:
-
Using
lsb_release
:Open a terminal and run the following command:
lsb_release -a
This will display detailed information about your Linux distribution, including the distributor ID, description, release number, and codename.
-
Using
uname
:Open a terminal and execute either of the following commands:
To retrieve the operating system name:
uname -s
To obtain the kernel version:
uname -r
To get additional system information, try using the
-a
flag:uname -a
The
uname
command provides information about the underlying operating system and kernel.
Both the lsb_release
and uname
commands are commonly available on Linux systems. However, if your system does not have these commands installed, you may need to check the documentation specific to your Linux distribution or use alternative commands to get the operating system details.