Академический Документы
Профессиональный Документы
Культура Документы
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
/dev/hd2
/dev/hd3
/dev/hd9var
Boot
/dev/hd5
Paging
/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.
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
Recover root's
Password
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
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
LP Statistics
-s lpd
lpr
lpq
lprm
redhat-config-printer
printtool
smit mkpq
smit rmpq
Default Printer
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
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
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
jfs
ext3
reiserfs
/dev/rootvg
None
lsvg -l rootvg
vgdisplay -v
chpv
pvchange
mkdev -c disk -l
hdisk#
pvcreate
lspv
pvdisplay
reducevg
vgreduce
migratepv
pvmove
mkvg
vgcreate
varyoffvg
exportvg
chvg
varyonvg
varyoffvg
vgremove
vgchange
importvg
vgcfgrestore
exportvg/importvg
vgexport/vgimport
lsvg
vgscan
chlv
lvchange
lslv
lvdisplay
mklv
lvcreate
extendlv
lvextend
AIX Reduce LV
Procedure
lvreduce
rmlv
lvremove
bootlist -m normal
grub-install /dev/sda2 if
SCSI
grub-install /dev/hda2 if
IDE
resize2fs
rmlvcopy
lvsplit
Reduce/Split Mirrors
Merge Mirrors
Create Mirrors
Add Mirrors
lvmerge
mklv -c 2
mklvcopy lv 2
mklv -u 3 -S 64K
lvcreate -i 3 -I 64
mksysb -i /dev/rmt0
savevg -i rootvg
restvg
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
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
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.
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
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