There are several reliable commands to identify your AIX version. The most straightforward method is using the oslevel
command:
$ oslevel -s
7100-04-00-0000
The output format is VRMF-SP-YYYYMM
, where:
7
= Version (AIX 7)1
= Release (1)00
= Modification-04-
= Service Pack0000
= Build date
For more detailed system information, use the lslpp
command:
$ lslpp -h bos.rte
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.rte 7.1.0.4 COMMITTED Base Operating System Runtime
To see the actual kernel version running:
$ uname -a
AIX server1 1 7 00C7C1F54C00
The key components in this output:
AIX
- Operating system nameserver1
- Hostname1
- Kernel version number7
- Major OS version (AIX 7)
For maintenance level details:
$ oslevel -r
7100-04
This shows the version (7), release (1), and technology level (00-04).
Here's a bash script snippet to extract and format version info:
#!/bin/bash
aix_version=$(oslevel -s | cut -d'-' -f1)
aix_release=$(oslevel -s | cut -d'-' -f2)
tech_level=$(oslevel -r)
echo "AIX Version: $aix_version"
echo "Release Level: $aix_release"
echo "Technology Level: $tech_level"
While checking version, you might also need architecture info:
$ bootinfo -y
64
This returns either 32 or 64, indicating the kernel bitness.
The simplest way to check your AIX version is using the oslevel
command:
oslevel -s
This will return output like 7200-04-01-1543
, where:
- 7 - Major version (AIX 7)
- 2 - Minor version (7.2)
- 00-04-01-1543 - Service pack and build information
For a complete system overview, use:
prtconf | grep 'Kernel Version'
Or get all version-related info at once:
lslpp -h bos.rte
AIX uses Technology Levels for updates. Check with:
instfix -i | grep AIX_ML
Example output might show:
AIX_ML:7200-04
For scripting purposes, you might prefer:
echo "AIX Version: $(oslevel -r)"
Or parsing the output for clean version number:
oslevel -r | cut -d'-' -f1
Check kernel architecture with:
bootinfo -K
Returns 32
or 64
indicating the kernel mode.
To see available versions and compare:
oslevel -rl
This lists all supported versions in your maintenance level.
For system administrators managing multiple servers, here's a simple shell script:
#!/bin/ksh
for host in $(cat hostlist); do
echo -n "$host: "
ssh $host "oslevel -s 2>/dev/null"
done