Vous êtes sur la page 1sur 5

2/16/2011 UNIXguide.

net ( AIX, FreeBSD, HP-UX, …


Total System Information Asset Agent & Utility for Windows, AppleMac, UNIX/Linux - GUI/CLI/API www.MagniComp.com/sysinfo
Cygwin/X vs. X-Win32 LIVE Tired of buggy Cygwin/X and lack of useful features? Try X-Win32 www.starnet.com
Dedicated Server US$119 Dual Quad-Core, 24 GB RAM, SSD 2x 1000 GB HDD, located in EU or US www.serverloft.com

© 2000 UNIXguide.net, All Rights Reserved. Hermelito Go (Last Update: Wednesday, 07-Dec-2005 11:11:32 PST )
Directory
AIX FreeBSD HP-UX LINUX(RedHat) SOLARIS
Mappings

Root filesystem / {/dev/hd4} / / {/dev/vg00/lvol1}


/
/ {/dev/vx/dsk/root
{/dev/ad0s1a} {/dev/sda1}

/export/home
Home Directory /home {/dev/hd1} /home {/dev/vg00/lvol4}
/dev/vx/dsk/h
/tmp
/tmp {/dev/hd3} /tmp {/dev/vg00/lvol6}
/dev/vx/dsk/swap

{/dev/hd2} /
usr
/usr /usr {/dev/vg00/lvol7} /usr
{/dev/ad0s1f}

/var {/dev/hd9var} /var /var {/dev/vg00/lvol8} /var


{/dev/ad0s1e}
Sample
configuration - /usr/newconfig
files
User Accounts AIX FreeBSD HP-UX LINUX(RedHat) Solaris

Password files
/etc/passwd /etc/passwd /etc/passwd /etc/passwd /etc/passwd
/etc/security/passwd /etc/master.passwd /tcb/files/auth/r/root /etc/shadow /etc/shadow
/etc/group /etc/group
Groups file /etc/group /etc/group /etc/group
/etc/security/group /etc/logingroup
Maximum # of
4294967295 65535 2147483647 65535 2147483647
user ID
Allow/Deny /etc/security/user /etc/ttys /etc/securetty /etc/securetty /etc/default/login
remote login {rlogin=true} {secure} {console} {ttyp1} {CONSOLE=/dev/consol
User nobody's id
4294967294 65534 -2 99 60001 & 65534(nobody
#
Group nobody's
4294967294 65534 -2(nogroup) 99 60002 & 65534(nogrou
id #
{lilo}
control-x
linux S
passwd root
boot from CD/Tape boot cdrom -s
>boot {grub}
Installation/Maintenance c mkdir /tmp/a
Recover root ok boot -s Interact with IPL ? Y
password Start Limited Shell kernel vmlinuz-2.4.9- mount /dev/c0t0d0s0
passwd root ISL>hpux -iS
getrootfs hdisk0 13 single /tmp/a
passwd root
vi /etc/security/passwd ro root=/dev/hda8 vi /tmp/a/etc/shadow
initrd /initrd-2.4.9-
13.img
boot
passwd root

Create new user mkuser adduser useradd useradd useradd


Delete user rmuser rmuser userdel userdel userdel
List users lsuser -f ALL logins logins
Modify user
chuser -a usermod usermod usermod
account
General Commands AIX FreeBSD HP-UX LINUX(RedHat) Solaris
Unique host ID hostid uname -i hostid hostid

Administrator smit sam linuxconf admintool


Performance top top
top top top
monitor monitor glance
System activity
sar sa sar sar {sysstat} sar
reporter
Virtual Memory
vmstat vmstat vmstat vmstat vmstat
statistics
I/O statistics iostat iostat iostat iostat {sysstat} iostat
alog -o -t boot
Error logs dmesg dmesg dmesg dmesg
errpt
Physical RAM 1TB 4TB 64 GB {>2.3.24} 16TB

Shared Memory 2.75GB 8TB sysctl kernel.shmmax


Process Data
2GB 4GB 900 MB
Space
Swap device /dev/hd6 /dev/ad0s1b /dev/vg00/lvol2 /dev/sda2 /dev/vx/dsk/swapvol
Swap file type /etc/swapspaces swap swap partition type 82 swap
Display swap
lsps -a swapinfo swapinfo -a free swap -l
size
Activate Swap swapon -a swapon -a swapon -a swapon -a swap -a

www.unixguide.net/unixguide.shtml 1/5
2/16/2011 UNIXguide.net ( AIX, FreeBSD, HP-UX, …
Printers AIX FreeBSD HP-UX LINUX Solaris
Printer Queues /etc/qconfig /var/spool/print /etc/lp/interface/* /var/spool/lpd/lp/* /etc/lp/interfaces/*
Stop LP stopsrc -s lpd lpshut /etc/init.d/lpd stop /usr/lib/lp/lpshut
Start LP startsrc -s lpd lpd lpsched /etc/init.d/lpd start /usr/lib/lp/lpsched
enq
Submit print lp lp
lp lp lpr
jobs lpr lpr
qprt
enq -A
lpq
LP statistics lpq lpstat lpq lpstat
lpstat
qchk
cancel
Remove print lprm cancel cancel
cancel lprm
jobs qcan lprm lprm
enq -x
Add printer
smit mkpq lpadmin -p pq printtool lpadmin -p pq
queue
Remove Printer smit rmpq lpadmin -x pq lpadmin -x pq
queue
Make default
export LPDEST="pq" lpadmin -d pq lpadmin -d pq
printer
TCP/IP AIX HP-UX LINUX(RedHat) Solaris

/etc/hostname.*
Network IP /etc/sysconfig/network-
lsattr -E -l inet0 /etc/rc.conf /etc/rc.config.d/netconf /etc/inet/*
configuration scripts/
/etc/defaultrouter
Hosts IP
/etc/hosts /etc/hosts /etc/hosts /etc/hosts /etc/inet/hosts
addresses
Name service
/etc/netsvc.conf /etc/host.conf /etc/nsswitch.conf /etc/nsswitch.conf /etc/nsswitch.conf
switch
Network
no -a sysctl ndd -h sysctl -a | grep net ndd /dev/[tcp|ip] ?
parameters
Routing daemon gated routed gated routed in.routed
NIC
ifconfig -a ifconfig -a lanscan -v ifconfig -a ifconfig -a
Configurations
Secondary IP ifconfig xl0 alias modprobe ip_alias
ifconfig en0 alias IP ifconfig lan0:1 IP ifconfig hme0:1 IP u
Address IP ifconfig eth0:1 IP
HERALD @ BANNER @
Login prompt telnetd -b /etc/issue /etc/issue
/etc/security/login.cfg /etc/default/telnetd
odmget -q "attribute=num
and rebuild your kernel with
{/etc/system}
uniquetype=pty/pty/pty" these new values NPTY=#
NSTRPY=# set pt_cnt = # {SY
PdAt | sed "s/0-64/0-512/"
set npty = # {B
|
Increase the # reboot
odmchange -q cd /dev
of pseudo- {/etc/iu.ap}
terminals "attribute=num and ./MAKEDEV -v pty
uniquetype=pty/pty/pty" -o insf -d ptys -n # ptsl 0 # ldterm ttco
PdAt insf -d ptym -n #
halt
insf -d pts -s # -e -v
chdev -l pty0 -anum=256 -P boot -r
reboot
Maximum # of 176 {
512 {MAXUSERS} 256
ptys 3000 {S
remsh
Remote Shell rsh remsh rsh rsh
rsh
YP/NIS service
/usr/lib/netsvc/yp/ypbind /usr/sbin/ypbind /usr/lib/netsvc/yp/ypbind /sbin/ypbind /usr/lib/netsvc/yp/y
binder
System Files AIX FreeBSD HP-UX LINUX(RedHat) Solaris
/etc/dfs/dfstab
NFS exported /etc/exports /etc/exports /etc/exports /etc/exports
/etc/dfs/sharetab
NFS Client
mounted /etc/xtab /etc/xtab /var/lib/nfs/xtab /etc/rmtab
directories

1 TB
Max File System 128 GB 128 GB 2 TB
8000 TB {vxfs}

2 GB {512B block
1 TB
Max File Size 64 GB 128 GB size}
2 GB {=<2.5.1}
8192 GB {8KB block size}
Max # File
Descriptors 64 K 60~ K sysctl fs.file-max 64 K

DISK/LVM
AIX FreeBSD HP-UX:Disk &Filesystem LINUX(RedHat) SOLARIS
Commands
Filesystem table /etc/filesystems /etc/fstab /etc/fstab /etc/fstab /etc/vfstab
Free disk blocks df -k df -k bdf df -k df -k
Device listing lsdev -C /sbin/ioscan cat /proc/devices sysdef

format -d c#t#d#
cat
Disk information bootinfo -s hdisk# fdisk -v ad0 diskinfo /dev/rdsk/c#t#d#
/proc/scsi/scsi0/sda/model format>current

www.unixguide.net/unixguide.shtml 2/5
2/16/2011 UNIXguide.net ( AIX, FreeBSD, HP-UX, …
format>inquiry
Disk Label lspv -l hdisk# disklabel ad0 pvdisplay -v /dev/dsk/C#t#d# fdisk -l prtvtoc
LVM Concepts Partition sub disk logical extents logical extents sub disk
Volume Volume logical volume logical volume Volume
Plex Plex
Volume group volume group volume group disk group
Journal ext3
jfs vxfs vxfs
Filesystem type reiserfs
Default volume
/dev/rootvg /dev/vg00 /dev/vx/dsk/rootdg
group
Display volume
lsvg -l rootvg vgdisplay -v vg00 vgdisplay -v vxprint -l -g rootdg
group
Modify physical
chpv pvchange pvchange
volume
Prepare physical
mkdev -c disk -l hdisk# pvcreate pvcreate vxdiskadd
disk
List physical
lspv vinum ld pvdisplay pvdisplay vxprint -dl
volume
Remove disk from
reducevg vgreduce vgreduce vxdg rmdisk
volume group
Move logical
volumes to vinum move -f drive
migratepv pvmove pvmove vxassist move
another physical object
volumes
Create volume
mkvg vgcreate vgcreate vxdg init
group
Remove volume
vgremove vgremove
group
chvg
Volume group
varyonvg vgchange vgchange
availability
varyoffvg
Restore volume
vgcfgrestore vgcfgrestore
group
Exports volume
exportvg vgexport vgexport vxdg deport
group
Imports volume
importvg vgimport vgimport vxdg import
group
Volume group
lsvg vgscan vgscan
listing
Change logical
volume chlv lvchange lvchange vxedit set
characteristics

List logical
lslv vinum lv lvdisplay lvdisplay vxprint -vl
volume
Make logical
mklv lvcreate lvcreate vxassist make
volume
Extend logical
extendlv lvextend lvextend vxassist growto
volume
Reduce logical
AIX reduce LV lvreduce lvreduce vxassist shrinkto
volume
Remove logical
rmlv vinum rm vol lvremove lvremove vxedit rm
volume
Prepare boot
bootlist -m normal lvlnboot lilo vxbootsetup
volumes
Remove boot
lvrmboot
volumes
extendfs /dev/vg00/lvol8
Extend File resize2fs vxva
chfs -a size=# /mt fsadm -F vxfs -b
system resize_reiserfs mkfs -M
{LE * 1024} /mt
Reduce/Split
rmlvcopy lvsplit lvsplit
mirrors
Merge mirrors lvmerge lvmerge

Create mirrors mklv -c 2 vinum mirror drive lvcreate -m 1 vxassist mirror

Add mirrors mklvcopy lv 2 lvextend -m 1


Create striped vxassist make vol 10
mklv -u 3 -S 64K vinum stripe drive lvcreate -i 3 -I 64 lvcreate -i 3 -I 64
volumes layout=raid5
System recovery
mksysb -i /dev/rmt0 /opt/ignite/bin/make_recovery
tape
Backup savevg -i rootvg vinum saveconfig fbackup tar cvf /dev/rst0 / ufsdump
Restore restvg frecover tar xvf /dev/rst0 ufsrestore
MISC AIX FreeBSD HP-UX LINUX(RedHat) SOLARIS
Startup script /etc/rc /etc/rc /sbin/rc /etc/rc.d/rc /etc/init.d
Kernel /usr/lib/boot/unix_up /kernel /stand/vmunix /boot/vmlinuz /kernel/genunix
sysdef
Kernel
lsattr -E -l sys0 sysctl -a kmtune sysctl -a sysdef -i
Parameters
kmsystem
cd /usr/src/linux
make mrproper

www.unixguide.net/unixguide.shtml 3/5
2/16/2011 UNIXguide.net ( AIX, FreeBSD, HP-UX, …
cd /stand/build make menuconfig
/usr/lbin/sysadm/system_prep make dep
cd /sys/i386/conf -v -s system make clean
vi KERNEL vi system make bzImage
config KERNEL mk_kernel -s system make install
Reconfigure the cd cd /stand vi /etc/system
kernel
make modules
chdev -l sys0 -a ../../compile/KERNEL mv system system.prev reboot
make modules_install
make depend
mv vmunix vmunix.prev
make
mv dlkm dlkm.prev cp arch/i386/boot/bzImage
make install
mv /stand/build/system system /boot/vmlinuz-2.2.16
kmupdate
mkinitrd /boot/initrd-2.2.16.img
/stand/build/vmunix_test
2.2.16
vi /etc/lilo.conf
lilo
List modules genkex kldstat kmadmin -s lsmod modinfo
Load module kldload kmadmin -L insmod modload
Unload module kldunload kmadmin -U rmmod modunload
Initialize
install_assist /stand/sysinstall set_parms initial netconf sys-unconfig
system
grep -i Physical
Physical RAM bootinfo -r sysctl hw.physmem free prtconf
/var/adm/syslog/syslog.log
Kernel Bits bootinfo -K getconf KERNEL_BITS getconf LONG_BIT isainfo -kv
Crash utility crash crash adb lcrash crash
Trace System
syscalls truss tusc strace truss
Calls
uname -m model
Machine model uname -m uname -m uname -imp
bootinfo -m uname -m
OS Level oslevel uname -r uname -r uname -r uname -r
Run Level who -r who -r runlevel who -r

Core dump files /var/adm/ras /var/adm/crash /var/crash/`uname -n


{lilo}
control-x
linux S

Key on service mode/F4 {grub}


>boot
Boot from CD/Tape c
Boot single user ok boot -s Interact with IPL ? Y ok boot -s
Select Maintenance kernel vmlinuz-2.4.9-
ISL>hpux -iS
Limited function Shell 13 single
ro root=/dev/hda8
initrd /initrd-2.4.9-
13.img
boot
>boot
Maintenance mode ok boot -as Interact with IPL ? Y ok boot -as
ISL>hpux -lm
Interrupt Key control-B Stop-A
Return to
co ok go
console
Timezone /etc/environment /etc/TIMEZONE
/etc/localtime /etc/TIMEZONE /etc/sysconfig/clock
Management /etc/profile /etc/default/init
/etc/rc.conf
/etc/ntp.conf /etc/rc.config.d/netdaemons /etc/ntp.conf /etc/inet/ntp.conf
NTP Daemon {xntpd_enable="YES"}
startsrc -s xntpd /sbin/init.d/xntpd /etc/rc.d/init.d/xntpd /etc/init.d/xntpd
/etc/rc.network
Software AIX HP-UX LINUX(RedHat) SOLARIS
Install Software installp -a pkg_add swinstall rpm -i package pkgadd
Uninstall
installp -u pkg_delete swremove rpm -e package pkgrm
software
List installed
lslpp -L all pkg_info -a swlist rpm -qa pkginfo
software
Verify installed pkginfo -i
lppchk -v swlist -l fileset -a state rpm -V package
software pkginfo -p
List all files lslpp -f fileset pkg_info -L package swlist -l file fileset rpm -ql package pkgchk -l package
List installed swlist -l patch
instfix -i patchadd -p
patches what /stand/vmunix
Package owner lslpp -w path swlist -l file | grep path rpm -qf file pkgchk -l -p path
SW Directory /usr/lpp /var/db/pkg /var/adm/sw/ /var/lib/rpm /var/sadm
Devices AIX FreeBSD HP-UX LINUX(RedHat) SOLARIS
Devices /dev /dev /dev /dev /devices
drvconfig
Install devices devlinks
for attached cfgmgr -v /dev/MAKEDEV insf -e /dev/MAKEDEV disks
peripherals
tapes
ports
Remove device rmdev -l rmsf rem_drv
Device drivers lscfg lsdev prtconf -D
CPU lsdev -Cc processor sysctl hw.model ioscan -fnC processor cat /proc/cpuinfo psrinfo -v
List Terminal lsdev -Cc tty ioscan -fnC tty pmadm -l

www.unixguide.net/unixguide.shtml 4/5
2/16/2011 UNIXguide.net ( AIX, FreeBSD, HP-UX, …
/usr/platform/`uname
lspci sbin/prtdiag
Diagnostics diag pciconf -l stm
pnpdump ok test-all
/opt/SUNWvts/bin/sun
Whole Disk /dev/hdisk# /dev/ad0s1c /dev/dsk/c#t#d0 /dev/sda /dev/c#t#d0s2
CDROM /dev/cd0 /dev/acd0c /dev/dsk/c#t2d0 /dev/cdrom /dev/dsk/c#t6d0s2
CDROM file type cdrfs cd9660 cdfs iso9660 hsfs
Rewinding tape /dev/rst0 {
/dev/rmt0 /dev/rwt0d /dev/rmt/0m /dev/rmt/0
drive c 9 0}
Non-rewinding /dev/nrst0 { c 9
/dev/rmt0.1 /dev/nrwt0d /dev/rmt/0mn /dev/rmt/0n
tape drive 128 }
Floppy drive /dev/rfd0 /dev/fd0 - /dev/fd0 /dev/diskette
Links AIX FreeBSD HP-UX LINUX(RedHat) SOLARIS
FAQ AIX-FAQ FreeBSD FAQ HP-UX FAQ LINUX FAQ Solaris 2 FAQ
Linux Documentation
Online Manual AIX 5.3 Docs FreeBSD Hand Book HP-UX Reference Manual
Project
Solaris 10 Documenta

Technical
p5 TechSupport IT Resource Center Red Hat support SunSolve
Support
Phone Number 1-800-CALL-AIX 1-800-633-3600 1-888-REDHAT1 1-800-USA-4SUN
Public Domain Software
Free Software
Library FreeBSD Primary Site HP-UX Ports Linux Software Map Sun Freeware

Certification www.ibm.com education.hp.com RHCE suned.sun.com

Linux Training Try before you buy - 50 free videos Linux+, LPIC, Advanced Linux cbtnuggets.com
Buy Linux The Latest Linux Releases Delivered Low Prices - Fast, Free Shipping www.OSDisc.com
HP Elitebook Notebook View & Compare, Cost Efficient and Light Weight HP Business Laptop! www.hp.com/ph

UNIXguide.net Google Search Suggest a Site


English to Visayan Cebuano Dictionary Visayan Cebuano to English Dictionary

www.unixguide.net/unixguide.shtml 5/5

Vous aimerez peut-être aussi