Вы находитесь на странице: 1из 7

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

AIX
/

/dev/hd4

RedHat Linux
/

/dev/sda2 if SCSI
/dev/hda2 if IDE

/home
Home Directories
/usr
O.S. Executables
/tmp
Temporary Space
System Variable Data /var

/dev/hd1

/home is in Root File System

/dev/hd2

/usr is in Root File System

/dev/hd3

/tmp is in Root File System

/dev/hd9var

/var is in Root File System

Boot

/dev/hd5

Paging

/boot

/dev/sda1 if SCSI
/dev/hda1 if IDE

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

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.

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

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

Recover root's
Password

Create new user mkuser


rmuser
Delete user
Default User
Group

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

staff=Group ID 1

General
Commands

AIX

RedHat Linux

Absolute Path tar

tar 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 smitty

Performance
Monitor

top
lsof
monitor

System Activity
Reporter

sar

sar
sysstat

I/O Statistics

iostat

iostat
sysstat

Boot-Time Error
alog -o -t boot
Log
Display Swap Size lsps -a

41 redhat-config-* programs in
/usr/sbin & /usr/bin
top
lsof

dmesg
free

Printers
Printer Queues

AIX

RedHat Linux

/etc/qconfig

/var/spool/lpd/lp/*

startsrc -s lpd

service cups start


service cups stop
service cups status

Control Print Server Daemon stopsrc -s lpd


lssrc
enq
lp
lpr
qprt
enq -A
lpq
lpstat
qchk
cancel
lprm
qcan
enq -x

Submit Print Jobs

LP Statistics

Remove Print Jobs

-s lpd

lpr

lpq

lprm
redhat-config-printer
printtool

Add Printer Queue

smit mkpq

Remove Printer Queue

smit rmpq

Default Printer

First Stanza in /etc/qconfig


export LPDEST="pq"

TCP/IP
Network IP
Configuration
Name Service
Switch
Network Parameters
Secondary IP
Address
Login
Prompt/Herald

AIX

RedHat Linux

lsattr -E -l inet0

/etc/sysconfig/networkscripts/ifcfg-eth*

/etc/netsvc.conf

/etc/nsswitch.conf

no -a

sysctl -a | grep net

ifconfig en0 alias


w.x.y.z

modprobe ip_alias
ifconfig eth0:1 w.x.y.z

/etc/security/login.cfg

/etc/issue

System Files
AIX
RedHat Linux
NFS Client Mounted Directories /etc/xtab /var/lib/nfs/xtab
128 GB
2 TB
Max File System Size
Max File Size

LVM Commands

64 GB

2 GB
8192 GB

AIX

(512-byte block size)


(8-KB block size)

RedHat Linux

Filesystem Table
Device Listing

/etc/filesystems

/etc/fstab

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

jfs

ext3
reiserfs

Default Volume Group


Display Volume Group
Modify Physical Volume

/dev/rootvg

None

lsvg -l rootvg

vgdisplay -v

chpv

pvchange

Prepare Physical Disk

mkdev -c disk -l
hdisk#

pvcreate

List Physical Volume


Remove disk from volume
group
Move logical volumes to
another physical volumes
Create volume group

lspv

pvdisplay

reducevg

vgreduce

migratepv

pvmove

mkvg

vgcreate

Remove Volume Group

varyoffvg
exportvg
chvg
varyonvg
varyoffvg

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

vgremove
vgchange

importvg

vgcfgrestore

exportvg/importvg

vgexport/vgimport

lsvg

vgscan

chlv

lvchange

lslv

lvdisplay

mklv

lvcreate

extendlv

lvextend

Reduce Logical Volume

AIX Reduce LV
Procedure

lvreduce

Remove Logical Volume

rmlv

lvremove

Prepare Boot Volumes

bootlist -m normal

grub-install /dev/sda2 if
SCSI
grub-install /dev/hda2 if
IDE

Extend File System

chfs -a size=# fsname


(# is 512-byte
blocks)

resize2fs

rmlvcopy

lvsplit

Reduce/Split Mirrors
Merge Mirrors
Create Mirrors
Add Mirrors

lvmerge
mklv -c 2
mklvcopy lv 2

Create Striped Volumes


System Recovery Tape
Backup
Restore

mklv -u 3 -S 64K

lvcreate -i 3 -I 64

mksysb -i /dev/rmt0
savevg -i rootvg

tar cvf /dev/rst0 /

restvg

tar xvf /dev/rst0

Miscellaneous
Commands
Startup script

/etc/rc

/etc/rc.d/rc

Kernel

/usr/lib/boot/unix_up

/boot/vmlinuz (compressed)
/boot/vmlinux (uncompressed)

Kernel Parameters

lsattr -E -l sys0
no -a

sysctl -a

Reconfigure the
Kernel

AIX

chdev -l sys0 -a

RedHat Linux

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 initrd2.4.21-20.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

lsmod
insmod
rmmod

install_assist

netconf

bootinfo -r

free

bootinfo -K

getconf WORD_BIT

crash

lcrash

syscalls

strace

oslevel

uname -r

who -r

runlevel

tctl

mt

/var/adm/ras
/etc/environment
/etc/profile

/etc/sysconfig/clock

/etc/ntp.conf
startsrc -s xntpd
stopsrc -s xntpd
lssrc -s xntpd

/etc/ntp.conf
service xntpd start
service ntpd stop
service ntpd status

Software
AIX
Install Software installp -a
Uninstall
installp -u
Software
List Installed lslpp -L
all
Software
Verify Installed lppchk -v
Software
List Files

lslpp -f
fileset

List Installed
Patches

instfix -i
lslpp -w

Package Owner path


SW Directory /usr/lpp
Rescan SCSI
Bus

cfgmgr

Devices
Install Devices
Remove Device
Device Drivers
CPU
List Terminal
Diagnostics

RedHat Linux
rpm -i package
rpm -e package
rpm -qa
rpm -V package
rpm -ql package

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

AIX

RedHat Linux

cfgmgr -v

/dev/MAKEDEV

rmdev -l
lscfg
lsdev -Cc processor cat /proc/cpuinfo
lsdev -Cc tty
lspci
pnpdump

diag

/dev/hdisk#
Whole Disk
/dev/cd0
CDROM
CDROM File System Type cdrfs
/dev/rmt0
Rewinding Tape Drive
Non-rewinding Tape Drive /dev/rmt0.1
/dev/rfd0
Floppy Drive

AFS
AIX
Code
IBM Transarc's Lab
Source
AFS Cache Should be defined as

/dev/sda
/dev/cdrom
iso9660
/dev/rst0
/dev/nrst0

{ c 9 0}
{ c 9 128 }

/dev/fd0

RedHat Linux
www.openafs.org
Same.

/usr/vice/ca its own file system


before installing AFS.
che
100MB is minimum. 1GB
is better.

Install
Directions

mkdir /tmp/afs
cd /tmp/afs
scp -p
jasper@jasper:/afs/d/software/base/linux
/openafs-1.2.11/* .
rpm -ivh *rpm
cd /tmp
vi /usr/vice/etc/cacheinfo and set the
ftp jasper
cache size to 95% of the number of 1K
cd
blocks of /usr/vice/cache. 95% of 1GB
/afs/d/software/base/AF
(my standard), is 953850.
S_3.6
vi /usr/vice/etc/ThisCell
get afsinstall.sh
set the cell name to delphion.com.
get afsclient-42.tar
vi /usr/vice/etc/CellServDB
quit
replace all existing lines with
chmod +x afsinstall.sh
>delphion.com # Thomson-Delphion
./afsinstall.sh
10.224.88.241 #afs1.delphion.com
afsclient-42.tar
To start AFS, service afs start
rm afsinstall.sh
To allow AFS-authenticated logins,
afsclient-42.tar
ftp's, etc,
cd /etc/pam.d
cp -p system-auth system-auth.Before.AFS
cp -p --reply=yes /tmp/afs/system-auth
system-auth
rm -rf /tmp/afs

@sys
(fs
sysname)

rs_aix42

DelphionStandard
Links

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

i386_linux24

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


/u -> /afs/d/u

Other References
AIX
RedHat Linux
AIX-FAQ
Linux FAQ
FAQ
AIX 4.3 Books
Linux Documentation Project
Online Manual
Technical Support RS/6000 TechSupport Red Hat support
1-800-CALL-AIX
1-888-REDHAT1
Phone Number
Bull
Linux Software Map
Free Software
www.ibm.com
RHCT & RHCE
Certification

Вам также может понравиться