What OS is this??? – Gathering basic system info – Part 1

It may look silly, but many times a sysadmin needs to deal with so many servers (physical or virtual does not make much of a difference), that maybe doesn´t even know the machine where is actually connecting to do something.

It may be one of those cases where you think: What OS is this?, so you need to quickly find out what Operating System just landed on your hands, at least to know what commands you need to progress further.

Some people might say: -That’s an easy one, as I recognize the OS I’m logged in just by looking at the prompt…

And that’s usually true on companies where the OS has been left installed by default, and are not hardenend, as one of the first things to remove from a OS prompt are precisely all indicators of the OS or company the computer belongs to.

So, to begin digging some info (this obviously will depend of the permits that our login account has, as if it is a specific login for an application or simmilar, this commands will not be available to us neither), the first command will be “uname”.

uname is a command that has been in UNIX for many years (it’s origins seems to date from AT&T’s the Programmer’s Workbench -PWB/UNIX-), and is also present in Linux, VMWare ESXi, Android, IBM i qsh, HP NonStop OSS, and probably others, which makes it the most cross platform command available to gather system info.

What info can we get from uname?:

The flags most commonly implemented in uname are the following:

-a   Print all
-m   The machine (hardware) type
-n   Hostname
-r   OS release
-s   OS name (default)
-p   Processor type
-v   OS version

Let’s see an example:

> uname -a
OS400 pub1 3 5 00650002381B

In this case,
First we have the OS --> OS400 (that'll be the OS of the IBM's AS/400, iSeries, IBM i...)
second the hostname  --> pub1
third the release    --> 3
fourth the version   --> 5
fifth the machine    --> 00650002381B (in this case machine displays the serial number)

So, we have an iSeries v5.3, named pub1 with S/N 650002381B

Let’s see another example:

> uname -a
OS400 i_PRD 1 7 0065000C0AEA

Here we have an IBM i v7.1, named i_PRD, with S/N 65000C0AEA

If we don’t have a qsh shell, but the AS/400 shell, then use this version of the same command:

QSH CMD('uname -a')

A new screen will display an output, simmilar to the following:

OS400 pub1 3 5 00650002381B
Press ENTER to end terminal session.

I will carry on talking about the uname command used in different OS in following posts.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: