AIX-To-Linux Quick Start Comparison
AIX-To-Linux Quick Start Comparison
Modified from a more-complete UNIXguide.net page. Man Pages Directory Mappings User Accounts General Commands Printers TCP/IP System Files LVM Commands Miscellaneous Commands Software Devices AFS Other References
Directory Mappings Root File System Home Directories O.S. Executables Temporary Space
/ /home /usr /tmp
AIX
/dev/hd4 /dev/hd1 /dev/hd2 /dev/hd3 /dev/hd9var /dev/hd5 /
RedHat Linux
/dev/sda2 if SCSI /dev/hda2 if IDE
/home is in Root File System /usr is in Root File System /tmp is in Root File System /var is in Root File System /boot /dev/sda1 if SCSI /dev/hda1 if IDE
See also the Filesystem Hierachy Standard (FHS) for a fuller discussion of the "proper" UNIX file system hierarchy. Linux has three sets of apparently duplicate directories; /bin & /usr/bin, /sbin & /usr/sbin, and /lib & /usr/lib. This can be a source of confusion. Under AIX for example, ksh is the default shell and it's normal to see #!/usr/bin/ksh in the first line of a ksh script. Under Linux, bash (the Bourne-Again Shell) is the default shell and ksh is NOT in /usr/bin/ksh, leading one to believe Linux does not have ksh. Not true. Under Linux, ksh is at /bin/ksh. (Actually, since /bin is a link to /usr/bin under AIX, ksh is also at /bin/ksh, so to make bilinugual scripts, #!/bin/ksh is best.) The reason for these apparently duplicate directories is, in the initial boot phases or when Linux boots into single-user mode (which is the same thing), only the root file system is mounted. It's true that by default, /usr is in the root file system, but it may not be. It might be configured in its own partition or even NFS mounted from another machine in R/O mode. Given this, everything needed to boot Linux or will be needed to repair a broken system, needs to be in the root file system. Yet to keep the root file system as small as possible, all non-essential files are kept under /usr. This is also why they say that those 5 directories (/bin, /sbin, /etc, /dev, and /lib) must be in the root partition.
AIX
/etc/passwd /etc/security/passwd rlogin=true in /etc/security/user stanza /etc/passwd /etc/shadow
RedHat Linux
At grub boot loader screen, press "e" to edit, Boot from CD or Tape, select "kernel" line Installation/Maintenance press "e" to edit, Start Limited Shell Add " s" at end of line getrootfs hdisk0 press <Enter> to accept changes, vi /etc/security/passwd press "b" to boot, at shell prompt, passwd root useradd userdel The same as their userid, both name and number. E.G. User Name=jasper, User ID=10167, Group Name=jasper, Group ID=10167
General Commands Absolute Path tar ping Broadcast Address Admin Helpers
AIX
tar cvf foo.tar /etc/passwd ping -c 1 10.224.88.255 smit or smitty top
RedHat Linux
tar Pcvf foo.tar /etc/passwd ping -b -c 1 10.224.88.255 41 redhat-config-* programs in /usr/sbin & /usr/bin top lsof sar sysstat iostat sysstat dmesg free
sar iostat
AIX
startsrc -s lpd stopsrc -s lpd lssrc -s lpd enq lp lpr qprt
RedHat Linux
/var/spool/lpd/lp/* service cups start service cups stop service cups status lpr
LP Statistics
Remove Print Jobs Add Printer Queue Remove Printer Queue Default Printer
enq -A lpq lpstat qchk cancel lprm qcan enq -x smit mkpq smit rmpq First Stanza in /etc/qconfig export LPDEST="pq"
lpq
TCP/IP Name Service Switch Network Parameters Secondary IP Address Login Prompt/Herald
AIX
/etc/netsvc.conf no -a ifconfig en0 alias w.x.y.z /etc/security/login.cfg
RedHat Linux
/etc/sysconfig/network-scripts/ifcfg-eth* /etc/nsswitch.conf sysctl -a | grep net modprobe ip_alias ifconfig eth0:1 w.x.y.z /etc/issue
AIX
128 GB 64 GB 2 TB 2 GB 8192 GB
RedHat Linux
LVM Commands Filesystem Table Device Listing Disk Information LVM Concepts
lsdev -C
AIX
/etc/filesystems
RedHat Linux
/etc/fstab cat /proc/devices cat /proc/scsi/scsi0/sda/model Logical Extents Logical Volume ext3 reiserfs None vgdisplay -v pvchange pvcreate
Journal File System Type Default Volume Group Display Volume Group Modify Physical Volume Prepare Physical Disk
List Physical Volume Remove disk from volume group Move logical volumes to another physical volumes Create volume group Remove Volume Group Volume Group Availability Restore Volume Group Export/Import Volume Group List Volume Groups Change Logical Volume Characteristics List Logical Volumes Make Logical Volume Extend Logical Volume Reduce Logical Volume Remove Logical Volume Prepare Boot Volumes Extend File System Reduce/Split Mirrors Merge Mirrors Create Mirrors Add Mirrors Create Striped Volumes System Recovery Tape Backup Restore
lspv reducevg migratepv mkvg varyoffvg exportvg chvg varyonvg varyoffvg importvg exportvg/importvg lsvg chlv lslv mklv extendlv AIX Reduce LV Procedure rmlv
pvdisplay vgreduce pvmove vgcreate vgremove vgchange vgcfgrestore vgexport/vgimport vgscan lvchange lvdisplay lvcreate lvextend lvreduce lvremove grub-install /dev/sda2 if SCSI grub-install /dev/hda2 if IDE
bootlist -m normal
chfs -a size=# fs-name resize2fs (# is 512-byte blocks) rmlvcopy lvsplit lvmerge mklv -c 2 mklvcopy lv 2 mklv -u 3 -S 64K mksysb -i /dev/rmt0 savevg -i rootvg restvg tar cvf /dev/rst0 / tar xvf /dev/rst0 lvcreate -i 3 -I 64
AIX
/etc/rc.d/rc
RedHat Linux
chdev -l sys0 -a
make mrproper make menuconfig make dep make clean make bzImage make install make modules make modules_install cp arch/i386/boot/bzImage /boot/vmlinuz-2.2.16 cd /boot mv initrd-2.4.21-20.ELsmp initrd-2.4.2120.ELsmp.save mkinitrd initrd-2.4.21-20.ELsmp $(uname -r) vi /boot/grub/grub.conf
List modules Load module Unload module Initialize System Physical RAM Kernel Bits Crash Utility Trace System Calls OS Level Run Level Tape Control Core Dump Files Timezone Management NTP Daemon
genkex
install_assist bootinfo -r bootinfo -K crash syscalls oslevel who -r tctl /var/adm/ras /etc/environment /etc/profile /etc/ntp.conf startsrc -s xntpd stopsrc -s xntpd lssrc -s xntpd
/etc/sysconfig/clock /etc/ntp.conf service xntpd start service ntpd stop service ntpd status
AIX
installp rpm -i package
RedHat Linux
Verify Installed lppchk -v rpm -V package Software List Files List Installed
lslpp -f fileset rpm -ql package
instfix -i lslpp -w path rpm -qf file /var/lib/rpm echo "scsi add-single-device 0 1 2 3" > /proc/scsi/scsi will reprobe for a single device only on Card 0, Channel 1, Device 2, Lun 3, and add it if it is found
SW Directory /usr/lpp
cfgmgr
Devices Install Devices Remove Device Device Drivers CPU List Terminal Diagnostics Whole Disk CDROM Rewinding Tape Drive Floppy Drive
AIX
cfgmgr -v rmdev -l lscfg
RedHat Linux
/dev/MAKEDEV
lsdev -Cc processor cat /proc/cpuinfo lsdev -Cc tty diag /dev/hdisk# /dev/cd0 lspci pnpdump /dev/sda /dev/cdrom iso9660 /dev/rst0 /dev/nrst0 /dev/fd0 { c 9 0} { c 9 128 }
AFS
AIX
www.openafs.org Should be defined as its own Same.
RedHat Linux
Code Source IBM Transarc's Lab AFS Cache file system before /usr/vice/cache installing AFS. 100MB is
minimum. 1GB is better.
Install Directions
mkdir /tmp/afs cd /tmp/afs scp -p jasper@jasper:/afs/d/software/base/linux/openafs1.2.11/* . rpm -ivh *rpm cd /tmp vi /usr/vice/etc/cacheinfo and set the cache size ftp jasper to 95% of the number of 1K blocks of cd /usr/vice/cache. 95% of 1GB (my standard), is /afs/d/software/base/AFS_3.6 953850. get afsinstall.sh vi /usr/vice/etc/ThisCell get afsclient-42.tar set the cell name to delphion.com. quit vi /usr/vice/etc/CellServDB chmod +x afsinstall.sh replace all existing lines with ./afsinstall.sh afsclient>delphion.com # Thomson-Delphion 42.tar 10.224.88.241 #afs1.delphion.com rm afsinstall.sh afsclientTo start AFS, service afs start
42.tar
To allow AFS-authenticated logins, ftp's, etc, cd /etc/pam.d cp -p system-auth system-auth.Before.AFS cp -p --reply=yes /tmp/afs/system-auth systemauth rm -rf /tmp/afs i386_linux24 /local -> /afs/d/@sys/local /u -> /afs/d/u
AIX
AIX 4.3 Books
RedHat Linux
Linux FAQ Linux Documentation Project
Technical Support RS/6000 TechSupport Red Hat support Phone Number Free Software Certification
1-800-CALL-AIX Bull www.ibm.com 1-888-REDHAT1 Linux Software Map RHCT & RHCE