AIX and Linux Commands
AIX and Linux Commands
Command
alog
OS
Command Description
Creates and maintains fixed-size log files created from standard input Creates and maintains fixed-size log files created from standard input Creates and maintains fixed-size log files created from standard input Displays boot information Displays boot information Displays and alters the list of boot devices Displays and alters the list of boot devices Creates boot image Change directoy Configures devices and optionally installs device software Changes the characteristics of a device Changes attributes of a file system Changes characteristics of a logical volume Changes attributes of a paging space Create a filesystem on a previously created LV
-L (List the log types currently defined in AIX the alog configuration database) -L -t boot (List the attributes for the specified log type boot) AIX
alog
alog bootinfo bootinfo bootlist bootlist bosboot cd cfgmgr chdev chfs chlv chps
-o -t boot (List the contents of a log file AIX specified by log type boot) -K (Displays if kernel is 32-bit or 64-bit enabled) -r (Displays real memory in kilobytes) -m normal -o (Show the devices to boot from, in order of priority) -m normal hdisk0 hdisk1 (Change the bootlist to include both hdisk0 & hdisk1) -a -d hdisk1 (Create a boot image on hdisk1) Directory name AIX AIX AIX AIX AIX All
(No arguments - Configures all devices AIX into the system) -l en0 -a state=down (Set the state of AIX en0 to down) -a size=200M /test (Set the size of the AIX /test filesystem to 200M) -x 900 opt_lv (Increase the max number AIX of logical partitions for LV opt_lv) -s64 hd6 (Increase paging space size AIX by 64 logical partitions) -v jfs2 -d applv -m /apps -A yes (Creates a jfs2 filesystem on a AIX previously created LV named applv and mounts on boot) -v jfs2 -g rootvg -a size=10G -m /apps -A yes (Creates a 10GB jfs2 filesystem AIX and an LV in the VG appvg and mounts on boot) -k (Show in Kilobytes) All (No arguments - Show description of Linux system hardware components) -d en0 (Show all statistics for the AIX
crfs
Create a filesystem and logical volume Display filesystem usage Dump a computer's DMI (SMBIOS) table contents Shows ethernet device
Command
errpt extendlv extendvg fdisk fdisk fget_config
OS
Command Description
ipcrm
lscfg
driver and device statistics Generates a report of -a (Show errors in detailed format) AIX logged errors hd2 3 (Extend LV hd2 by 3 unallocated Extend the size of a logical AIX PPs from the VG) volume -f rootvg hdisk1 (Add hdisk1 into the Adds physical volumes to a AIX volume group rootvg) volume group -l (List partition tables for devices) Linux Partition table manipulator /dev/sda1 (Run interactive menu on Linux Partition table manipulator /dev/sda1) -Av (Displays the LUNs presented from Displays LUNs presented the array and associated hdisk. If using AIX from an array plus hdisk RDAC displays associated DAC.) and RDAC info. Removes message queue, -m shared memory ID (Removes All semaphore set, or shared shared memory by ID) memory identifiers Reports interprocess -a (Prints most information) All communication facility status Lists or restores contents -f /dev/rmt0 (Use device /dev/rmt0) AIX of a VG or mksysb backup -c (Verifies checksum and file size are Verifies files of an AIX consistent with the SWVPD DB) installable s/w product -v (Verifies that /, /usr and /usr/share are Verifies files of an AIX valid with each other) installable s/w product -l (Long listing) All Lists contents of a directory -El sys0 (Displays effective system Displays info about the AIX attributes) attributes of a device Displays name, location (No arguments - Shows name, location AIX and description about and description for all devices) devices Displays configuration, -vl hdisk0 (Display VPD (Vital Product AIX diagnostic and VPD Data) information about hdisk0) information about a device -Cc adapter -S a (List available Displays device info in the adapters in the customized devices AIX device configuration object class) database Lists installed software -l (Lists additional data) AIX products -w /usr/sbin/aixmibd (Lists the fileset Lists a fileset that owns a AIX that owns aixmibd) file hd4 (Displays characteristics of LV Displays information about AIX "hd4") a logical volume Displays info about a (No arguments - Lists every physical AIX physical volume within a volume on the server) VG
Command
lsraid lsscsi lsslot lsslot lssrc lsvg lsvg lsvg lvchange lvcreate lvdisplay lvextend lvscan mdadm
OS
Command Description
mdadm
mdadm
-A -a /dev/md0 (Display a short listing of List and query Linux md Linux md0 devices List all SCSI devices or -c (Classic output) Linux hosts on system Displays info about hot -a (Shows available/unoccupied slots) AIX plug slots Displays info about hot -o (Shows occupied slots) AIX plug slots -a (Lists status of all defined Gets status of subsystems, AIX subsystems) or a subserver (No arguments - Lists all the Volume Displays information about AIX Groups on the system) volume groups vg01 (Displays characteristics of the VG Displays information about AIX "vg01") volume groups -l vg01 (Lists the names and Displays information about AIX characteristics of all LVs in the VG vg01) volume groups -pr vg00/lv2 (changes permission of LV Changes attributes of a Linux lv2 in VG vg00 to be read-only) logical volume -L 2G -n datalv datavg (Create a 2GB Create an LV in an existing Linux LV named datalv in VG datavg) VG -m (Display mapping of logical extents Display attributes of a Linux to physical volumes and extents) logical volume -L 40G /dev/system/root (Extend LV Extend the size of a logical Linux "/dev/system/root" to size 40G) volume Scan all disks for logical Linux volumes --create /dev/md0 --level=1 --raidCreate an MD (Multiple devices=2 /dev/sdb /dev/sdc (Create a Linux Device) software raid RAID 1 volume from two drives) device View status of MD (Multiple --detail /dev/md0 (View status of Linux Device) software raid /dev/md0) devices -Es | grep md0 Make MD (Multiple Device) >>/etc/mdadm.conf (Add RAID device Linux software raid devices md0 to /etc/mdadm.conf so that it can persistent at boot be seen at boot) Mirrors all the LVs that rootvg (Mirror rootvg) AIX exist on a given VG /home (Create directory /home) All Make a directory /dev/datavg/datalv (Create an ext3 file Linux Make an ext3 file system system on the LV) /dev/datavg/datalv (Create a reiserfs Suse Make a reiserfs file system file system on the LV) -y applv -t jfs2 appvg 20G AIX Creates a logical volume hdisk6 (Create a 20GB LV named applv of type jfs2 in VG appvg and allocate
Command
mksysb
OS
AIX
Command Description
Creates an installable image of rootvg Remounts / read write in mount -o remount,rw / Linux failsafe or single user mode -vcdrfs -oro /dev/cd0 /mnt (Mount the Makes a file system mount All cdrom device onto /mnt) available for use -a (Print table of arrays currently RDAC (a.k.a. MPP) Driver mppUtil Linux detected by this host) Utility -rn (Display the routing table. -n shows netstat addresses as numbers, does not resolve All Display routing table to names) -r (Shows version, release and Displays latest installed oslevel AIX maintenance level of AIX) maintenance level -rl 5300-04 (Shows which fileset Displays which fileset oslevel AIX updates are missing from 5300-04) updates are missing -s (Shows which service pack is Displays which service oslevel AIX installed) pack is installed Displays system prtconf (No arguments - shows all information) AIX configuration information Initialize a disk or partition pvcreate /dev/sdd (Initialize /dev/sdd) Linux for use by LVM Print Working Directory pwd (No arguments) All Show the current directory /dev/system/root (Resize the filesystem resize_reiserfs Suse Resize reiserfs filesytem to the size of the LV) -ivh package_file.rpm (Install verbosely rpm All Redhat Package Manager an rpm package file) -qa "string" (Search for installed rpm All Redhat Package Manager package with "string" in it's name) -qlp "package_file.rpm" (List files in rpm All Redhat Package Manager package file) -qp --info "package_file.rpm" (List rpm All Redhat Package Manager descriptive info from package file) -qp --scripts "package_file.rpm" (List rpm All Redhat Package Manager scripts in package file) -f -d "DirectoryName" (Copy the dump savecore AIX Save a system dump to "DirectoryName" even if invalid) 0x888 (Send 888 to the LCD on the Aids in physically locating a showled AIX front of IBM servers) server -Fr (Performs a fast shutdown restarting Shutdown or reboots the shutdown AIX afterwards) O/S -d -v -S (Displays the name of the array, Command line access for SMcli ip-addresses of the controllers and a All IBM/Brocade storage brief status) arrays
Command
SMcli
OS
Command Description
-n mysan -c "show allDriveChannels stats;" (Displays drive channel statistics All of the array "mysan") -n mysan -c "show storagesubsystem profile;" (Displays information about the All storage subsystem of the array "mysan")
ssaxlate
ssaxlate
sysdumpdev
sysdumpdev
sysdumpdev
Command line access for IBM/Brocade storage arrays Command line access for IBM/Brocade storage arrays Updates AIX with new update_all AIX maintenance level Try to identify service pack -vvv (Maximum verbosity) Suse level Translate between SSA -l pdisk10 (Lists SSA Logical disk logical disks (hdisks) and names which depend on the physical AIX SSA physical disks disk pdisk10 i.e. logical disk hdisk12) (pdisks) Translate between SSA -l hdisk12 (Lists SSA Physical disk logical disks (hdisks) and names which support the logical disk AIX SSA physical disks hdisk12 i.e. physical disk pdisk10) (pdisks) Displays and modifies the -e (Estimates the compressed size of information and settings the dump (in bytes) for the current AIX relating to traditional and running system) firmware-assisted system dump. Displays and modifies the information and settings -l (Display current dump device settings) AIX relating to traditional and firmware-assisted system dump. Displays and modifies the information and settings -L (Displays statistical information about AIX relating to traditional and the most recent system dump) firmware-assisted system dump. Displays OS, system -a (Show "all" information) All name, machine ID etc Deactivates a volume vg01 (Deactivate volume group "vg01") AIX group vg01 (Activate volume group "vg01") AIX Activates a volume group -a y /dev/vg01 (Activate volume group Changes attributes of a Linux vg01 or "-a n" to deactivate) volume group vg00 /dev/sdd (Create VG called vg00 Linux Create a volume group using /dev/sdd) Add physical volumes to a vg00 /dev/sdd (Add /dev/sdd to existing Linux volume group volume group vg00)