5
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 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. Directory Mappings AIX RedHat Linux Root File System / /dev/hd4 / /dev/sda2 if SCSI /dev/hda2 if IDE Home Directories /home /dev/hd1 /home is in Root File System O.S. Executables /usr /dev/hd2 /usr is in Root File System Temporary Space /tmp /dev/hd3 /tmp is in Root File System System Variable Data /var /dev/hd9var /var is in Root File System Boot /dev/hd5 /boot /dev/sda1 if SCSI /dev/hda1 if IDE Paging Logical Volume type="paging" Partition Id=82="Linux swap" User Accounts AIX RedHat Linux Password Files /etc/passwd /etc/security/passwd /etc/passwd /etc/shadow Allow/Deny root's Remote telnet Login rlogin=true in /etc/security/user stanza Comment out securetty line in /etc/pam.d/login Recover root's Password Boot from CD or Tape, Installation/Maintenance Start Limited Shell getrootfs hdisk0 vi /etc/security/passwd At grub boot loader screen, press "e" to edit, select "kernel" line press "e" to edit, Add " s" at end of line press <Enter> to accept changes, press "b" to boot, at shell prompt, passwd root Create new user mkuser useradd Page 1 of 5 AIX-to-Linux Quick Start Comparison 14-09-2013 http://rick.jasperfamily.org/linux/quickstart.html

Linux AIX Comparison

Embed Size (px)

DESCRIPTION

linux aix

Citation preview

Page 1: Linux AIX 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

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.

Directory Mappings AIX RedHat Linux

Root File System / /dev/hd4/ /dev/sda2 if SCSI

/dev/hda2 if IDE

Home Directories /home /dev/hd1 /home is in Root File System

O.S. Executables /usr /dev/hd2 /usr is in Root File System

Temporary Space /tmp /dev/hd3 /tmp is in Root File System

System Variable Data /var /dev/hd9var /var is in Root File System

Boot /dev/hd5/boot /dev/sda1 if SCSI

/dev/hda1 if IDE

Paging Logical Volume type="paging" Partition Id=82="Linux swap"

User Accounts AIX RedHat Linux

Password Files/etc/passwd

/etc/security/passwd

/etc/passwd

/etc/shadow

Allow/Deny root's Remote telnet Login

rlogin=true

in /etc/security/user stanzaComment out securetty line in /etc/pam.d/login

Recover root's Password

Boot from CD or Tape,

Installation/Maintenance

Start Limited Shell

getrootfs hdisk0

vi /etc/security/passwd

At grub boot loader screen,

press "e" to edit,

select "kernel" line

press "e" to edit,

Add " s" at end of line

press <Enter> to accept changes,

press "b" to boot,

at shell prompt, passwd root

Create new user mkuser useradd

Page 1 of 5AIX-to-Linux Quick Start Comparison

14-09-2013http://rick.jasperfamily.org/linux/quickstart.html

Page 2: Linux AIX Comparison

Delete user rmuser userdel

Default User Group staff=Group ID 1The same as their userid, both name and number. E.G. User Name=jasper, User ID=10167, Group Name=jasper, Group ID=10167

General Commands AIX RedHat Linux

Absolute Path tartar cvf foo.tar /etc/passwd

tar Pcvf foo.tar /etc/passwd

ping Broadcast Address ping -c 1 10.224.88.255 ping -b -c 1 10.224.88.255

Admin Helpers smit or smitty41 redhat-config-* programs in /usr/sbin & /usr/bin

Performance Monitortoplsofmonitor

toplsof

System Activity Reporter

sarsarsysstat

I/O Statistics iostatiostatsysstat

Boot-Time Error Log alog -o -t boot dmesg

Display Swap Size lsps -a free

Printers AIX RedHat Linux

Printer Queues /etc/qconfig /var/spool/lpd/lp/*

Control Print Server Daemonstartsrc -s lpdstopsrc -s lpdlssrc -s lpd

service cups startservice cups stopservice cups status

Submit Print Jobs

enqlplprqprt

lpr

LP Statistics

enq -Alpqlpstatqchk

lpq

Remove Print Jobs

cancellprmqcanenq -x

lprm

Add Printer Queue smit mkpqredhat-config-printerprinttool

Remove Printer Queue smit rmpq

Default PrinterFirst Stanza in /etc/qconfigexport LPDEST="pq"

TCP/IP AIX RedHat Linux

Network IP Configuration lsattr -E -l inet0 /etc/sysconfig/network-scripts/ifcfg-eth*

Name Service Switch /etc/netsvc.conf /etc/nsswitch.conf

Network Parameters no -a sysctl -a | grep net

Secondary IP Address ifconfig en0 alias w.x.y.zmodprobe ip_aliasifconfig eth0:1 w.x.y.z

Login Prompt/Herald /etc/security/login.cfg /etc/issue

System Files AIX RedHat Linux

NFS Client Mounted Directories /etc/xtab /var/lib/nfs/xtab

Max File System Size 128 GB 2 TB

Page 2 of 5AIX-to-Linux Quick Start Comparison

14-09-2013http://rick.jasperfamily.org/linux/quickstart.html

Page 3: Linux AIX Comparison

Max File Size 64 GB 2 GB (512-byte block size)

8192 GB (8-KB block size)

LVM Commands AIX RedHat Linux

Filesystem Table /etc/filesystems /etc/fstab

Device Listing lsdev -C cat /proc/devices

Disk Information bootinfo -s hdisk# cat /proc/scsi/scsi0/sda/model

LVM Concepts Partition Logical Extents

Volume Logical Volume

Journal File System Type jfsext3reiserfs

Default Volume Group /dev/rootvg None

Display Volume Group lsvg -l rootvg vgdisplay -v

Modify Physical Volume chpv pvchange

Prepare Physical Disk mkdev -c disk -l hdisk# pvcreate

List Physical Volume lspv pvdisplay

Remove disk from volume group reducevg vgreduce

Move logical volumes to another physical volumes migratepv pvmove

Create volume group mkvg vgcreate

Remove Volume Groupvaryoffvgexportvg

vgremove

Volume Group Availabilitychvgvaryonvgvaryoffvg

vgchange

Restore Volume Group importvg vgcfgrestore

Export/Import Volume Group exportvg/importvg vgexport/vgimport

List Volume Groups lsvg vgscan

Change Logical Volume Characteristics chlv lvchange

List Logical Volumes lslv lvdisplay

Make Logical Volume mklv lvcreate

Extend Logical Volume extendlv lvextend

Reduce Logical Volume AIX Reduce LV Procedure lvreduce

Remove Logical Volume rmlv lvremove

Prepare Boot Volumes bootlist -m normalgrub-install /dev/sda2 if SCSIgrub-install /dev/hda2 if IDE

Extend File Systemchfs -a size=# fs-name(# is 512-byte blocks)

resize2fs

Reduce/Split Mirrors rmlvcopy lvsplit

Merge Mirrors lvmerge

Create Mirrors mklv -c 2

Add Mirrors mklvcopy lv 2

Create Striped Volumes mklv -u 3 -S 64K lvcreate -i 3 -I 64

System Recovery Tape mksysb -i /dev/rmt0

Backup savevg -i rootvg tar cvf /dev/rst0 /

Restore restvg tar xvf /dev/rst0

Miscellaneous

CommandsAIX RedHat Linux

Startup script /etc/rc /etc/rc.d/rc

Kernel /usr/lib/boot/unix_up/boot/vmlinuz (compressed)/boot/vmlinux (uncompressed)

Page 3 of 5AIX-to-Linux Quick Start Comparison

14-09-2013http://rick.jasperfamily.org/linux/quickstart.html

Page 4: Linux AIX Comparison

Kernel Parameterslsattr -E -l sys0no -a

sysctl -a

Reconfigure the Kernel chdev -l sys0 -a

cd /usr/src/linux 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.21-20.ELsmp.save mkinitrd initrd-2.4.21-20.ELsmp $(uname -r)

vi /boot/grub/grub.conf

List modules genkex lsmod

Load module insmod

Unload module rmmod

Initialize System install_assist netconf

Physical RAM bootinfo -r free

Kernel Bits bootinfo -K getconf WORD_BIT

Crash Utility crash lcrash

Trace System Calls syscalls strace

OS Level oslevel uname -r

Run Level who -r runlevel

Tape Control tctl mt

Core Dump Files /var/adm/ras

Timezone Management/etc/environment/etc/profile

/etc/sysconfig/clock

NTP Daemon

/etc/ntp.confstartsrc -s xntpdstopsrc -s xntpdlssrc -s xntpd

/etc/ntp.confservice xntpd startservice ntpd stopservice ntpd status

Software AIX RedHat Linux

Install Software installp -a rpm -i package

Uninstall Software installp -u rpm -e package

List Installed Software

lslpp -L all rpm -qa

Verify Installed Software

lppchk -v rpm -V package

List Fileslslpp -f fileset

rpm -ql package

List Installed Patches

instfix -i

Package Ownerlslpp -w path

rpm -qf file

SW Directory /usr/lpp /var/lib/rpm

Rescan SCSI Bus cfgmgrecho "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

Devices AIX RedHat Linux

Install Devices cfgmgr -v /dev/MAKEDEV

Remove Device rmdev -l

Page 4 of 5AIX-to-Linux Quick Start Comparison

14-09-2013http://rick.jasperfamily.org/linux/quickstart.html

Page 5: Linux AIX Comparison

Device Drivers lscfg

CPU lsdev -Cc processor cat /proc/cpuinfo

List Terminal lsdev -Cc tty

Diagnostics diaglspcipnpdump

Whole Disk /dev/hdisk# /dev/sda

CDROM /dev/cd0 /dev/cdrom

CDROM File System Type cdrfs iso9660

Rewinding Tape Drive /dev/rmt0 /dev/rst0 { c 9 0}

Non-rewinding Tape Drive /dev/rmt0.1 /dev/nrst0 { c 9 128 }

Floppy Drive /dev/rfd0 /dev/fd0

AFS AIX RedHat Linux

Code Source IBM Transarc's Lab www.openafs.org

AFS Cache/usr/vice/cache

Should be defined as its own file system before installing AFS. 100MB is minimum. 1GB is better.

Same.

Install Directions

cd /tmpftp jasper cd /afs/d/software/base/AFS_3.6 get afsinstall.sh get afsclient-42.tar quitchmod +x afsinstall.sh./afsinstall.sh afsclient-42.tarrm afsinstall.sh afsclient-42.tar

mkdir /tmp/afscd /tmp/afsscp -p jasper@jasper:/afs/d/software/base/linux/openafs-1.2.11/* .rpm -ivh *rpmvi /usr/vice/etc/cacheinfo and set the cache size to 95% of the number of 1K blocks of /usr/vice/cache. 95% of 1GB (my standard), is 953850.vi /usr/vice/etc/ThisCellset the cell name to delphion.com.vi /usr/vice/etc/CellServDBreplace all existing lines with>delphion.com # Thomson-Delphion10.224.88.241 #afs1.delphion.comTo start AFS, service afs startTo allow AFS-authenticated logins, ftp's, etc,cd /etc/pam.dcp -p system-auth system-auth.Before.AFScp -p --reply=yes /tmp/afs/system-auth system-authrm -rf /tmp/afs

@sys(fs sysname)

rs_aix42 i386_linux24

Delphion-Standard Links

/local -> /afs/d/@sys/local/u -> /afs/d/u/usr/afsws -> /afs/d/@sys/usr/afsws

/local -> /afs/d/@sys/local/u -> /afs/d/u

Other References AIX RedHat Linux

FAQ AIX-FAQ Linux FAQ

Online Manual AIX 4.3 Books Linux Documentation Project

Technical Support RS/6000 TechSupport Red Hat support

Phone Number 1-800-CALL-AIX 1-888-REDHAT1

Free Software Bull Linux Software Map

Certification www.ibm.com RHCT & RHCE

Page 5 of 5AIX-to-Linux Quick Start Comparison

14-09-2013http://rick.jasperfamily.org/linux/quickstart.html