PowerWire.eu

Independent IBM i, AIX and Linux news and tech tips for Europe and beyond

  • Home
  • News
  • Technical Articles
    • IBM i
    • AIX
    • Linux
    • VIOS
  • Subscribe
  • About Us
  • Contact Us
  • Advertise with PowerWire.eu

AIX tech tip: make friends with the VIOS command syntax

July 28, 2014 by Anthony English

AIX tech tips

If you are familiar with running commands on AIX, you may have logged onto the Virtual I/O Server and found the syntax frustrating. For example, the following command on AIX will list disks:

lsdev –Cc disk

But when you’re logged into the restricted shell on the VIOS (usually as the user ‘padmin’), that will give you a syntax error. What you were meant to run was this:

lsdev –type disk

The VIOS syntax is remarkably similar to AIX commands but different enough to make an experienced AIXer frustrated. If you’re someone not used to working on AIX, the VIOS command syntax will appear a lot easier because your fingers won’t be pre-programmed to type in tried and true AIX syntax.

For the AIXperts, it’s often tempting to go to the full, unrestricted shell by logging in as padmin and then running the command

oem_setup_env

This is a pretty risky strategy, as is explained in the command documentation:

The oem_setup_env command will place the padmin user in a non-restricted UNIX root shell with a home directory in the /home/padmin directory. The user can then run any command available to the root user. This is not a supported Virtual I/O Server administration method. The purpose of this command is to allow installation of vendor software, such as device drivers.

My advice is to get used to the VIOS command line interface. Once you realise that there are certain patterns in the VIOS commands it will get a lot easier to use. For example, most commands to list start with “ls”. The commands to change devices begin with “ch”, and “rm” is used to remove.

So far, you’re probably thinking: big deal, AIX does the same. Well, once you get to the flags, you will start to learn them and maybe even start to like them.

Devices will be called with the –dev flag, attributes with the –attr flag. Here’s how to list the attributes for hdisk45:

lsdev –dev hdisk45 –attr

If you want to find out more about the VIOS restricted shell, you can check out the official command documentation for VIOS.

You might also find these articles helpful:

Get to Know the VIOS CLI

The VIO Cheat Sheet

Anthony English has worked on IBM Power Systems and their predecessors since the first commercial release of AIX. He is a well-recognised author in the field of IT, and has some unique perspectives on technical and business-related topics. Anthony is based in Sydney with his wife and seven young children.

Related Posts

  • Using the VIOS VMR for system backupsUsing the VIOS VMR for system backups
  • Tech tip: populating the VIOS Virtual Media RepositoryTech tip: populating the VIOS Virtual Media Repository
  • Opinion: An AIX guy finds his inner iOpinion: An AIX guy finds his inner i
  • Are you using the correct disk driver for your Storwize storage?Are you using the correct disk driver for your Storwize storage?
  • Europeans like it bigger, newer and with more LinuxEuropeans like it bigger, newer and with more Linux
  • Masterclass: advanced vSCSI disk monitoring (includes scripts)Masterclass: advanced vSCSI disk monitoring (includes scripts)

Filed Under: AIX, Technical Articles, VIOS Tagged With: AIX, VIOS, VIOS CLI, VIOS syntax, Virtual I/O Server

Free monthly newsletter signup

News

Bring Power to the cloud with Northdoor and Skytap

For organisations that run their x86 workloads on Azure, Skytap offers the ability to bring IBM Power … [Read More...]

An Ansible Environment Setup

Firstly, thank-you to all those who attended my Ansible workshop and presentation of Visual Studio Code at the … [Read More...]

Remain Software Milestone 3

NIEUWEGEIN, Netherlands — Today Remain Software is pleased to announce the third Milestone of TD/OMS V14 and … [Read More...]

More articles from this section

Quick Links

  • Advertise
  • Subscribe

Follow Us…

  • Email
  • LinkedIn
  • Twitter

Search This Website

Copyright © 2022 · Cue Communications · All Rights Reserved

Log in