Unix Commands on Different OS's (Doc ID 293561.1)

Unix Commands on Different OS's

 
General Commands
AIX
FreeBSD
HP-UX
LINUX(RedHat)
Solaris
Tru64
Unique host IDhostid uname -ihostidhostidhostid
Administratorsmit samlinuxconfadmintoolsysman
Performance monitortop 
monitor
toptop 
glance
toptoptop
System activity reportersarsasarsar {sysstat}sar/usr/opt/svr4/bin/sar
Virtual Memory statisticsvmstatvmstatvmstatvmstatvmstatvmstat
I/O statisticsiostatiostatiostatiostat {sysstat}iostatiostat
Error logsalog -o -t boot 
errpt
dmesgdmesgdmesg dmesguerf -R -o full
Physical RAM1TB 4TB64 GB {>2.3.24}16TB4TB
Shared Memory2.75GB 8TBsysctl kernel.shmmax  
Process Data Space2GB 4GB900 MB  
Swap device/dev/hd6/dev/ad0s1b/dev/vg00/lvol2/dev/sda2/dev/vx/dsk/swapvol/dev/rz0b
Swap file type/etc/swapspacesswapswappartition type 82 swapraw
Display swap sizelsps -aswapinfoswapinfo -afreeswap -lswapon -s
Activate Swapswapon -aswapon -aswapon -aswapon -aswap -aswapon -a
TCP/IP
AIX
 
HP-UX
LINUX(RedHat)
Solaris
Tru64
Network IP configurationlsattr -E -l inet0/etc/rc.conf/etc/rc.config.d/netconf/etc/sysconfig/network-scripts/ /etc/hostname.* 
/etc/inet/* 
/etc/defaultrouter
/etc/rc.config
Hosts IP addresses/etc/hosts/etc/hosts/etc/hosts/etc/hosts/etc/inet/hosts/etc/hosts
Name service switch/etc/netsvc.conf/etc/host.conf/etc/nsswitch.conf/etc/nsswitch.conf/etc/nsswitch.conf/etc/svc.conf
Network parametersno -asysctlndd -hsysctl -a | grep netndd /dev/[tcp|ip] ? 
Routing daemongatedroutedgatedroutedin.routedrouted
NIC Configurationsifconfig -aifconfig -alanscan -vifconfig -aifconfig -aifconfig -a
Secondary IP Addressifconfig en0 alias IP ifconfig xl0 alias IPifconfig lan0:1 IP modprobe ip_alias 
ifconfig eth0:1 IP
ifconfig hme0:1 IP upifconfig ln0 alias
Login promptHERALD @ 
/etc/security/login.cfg 
 telnetd -b /etc/issue /etc/issueBANNER @ 
/etc/default/telnetd
/etc/issue
Increase the # of pseudo-terminalsodmget -q "attribute=num and uniquetype=pty/pty/pty" PdAt | sed "s/0-64/0-512/" | 
odmchange -q "attribute=num and uniquetype=pty/pty/pty" -o PdAt

chdev -l pty0 -anum=256 -P
reboot

 rebuild your kernel with these new values NPTY=#  
NSTRPY=#

reboot

insf -d ptys -n # 
insf -d ptym -n # 
insf -d pts -s # -e -v 
 

cd /dev 
./MAKEDEV -v pty
{/etc/system} 
set pt_cnt = #   {SYSV} 
set npty = #      {BSD}

{/etc/iu.ap} 
ptsl 0 # ldterm ttcompat

halt 
boot -r

cd /dev 
./MAKEDEV PTY_1
Maximum # of ptys512 {MAXUSERS}256176                {BSD} 
3000              {SYSV}
8192
Remote Shellremsh 
rsh
rshremshrshrshrsh
YP/NIS service binder/usr/lib/netsvc/yp/ypbind /usr/sbin/ypbind/usr/lib/netsvc/yp/ypbind /sbin/ypbind/usr/lib/netsvc/yp/ypbind/usr/sbin/ypbind
System Files
AIX
FreeBSD
HP-UX
LINUX(RedHat)
Solaris
Tru64
NFS exported/etc/exports/etc/exports/etc/exports/etc/exports/etc/dfs/dfstab 
/etc/dfs/sharetab
/etc/exports
NFS Client mounted directories/etc/xtab /etc/xtab/var/lib/nfs/xtab/etc/rmtab/var/adm/mountdtab
Max File System128 GB 128 GB2 TB 1 TB
8000 TB {vxfs}
128 GB {<= 3.2G} 
512 GB {>= 4.0} 
16 TB {advfs}
Max File Size64 GB 128 GB2 GB     {512B block size}  
8192 GB  {8KB block size} 
1 TB
2 GB {=<2.5.1}
128 GB {<= 3.2G} 
512 GB {>= 4.0} 
16 TB {advfs}
Max # File Descriptors64 K 60~ Ksysctl fs.file-max64 K64 K
DISK/LVM Commands
AIX
FreeBSD
HP-UX:Disk &Filesystem
LINUX(RedHat)
SOLARIS
Tru64
Filesystem table/etc/filesystems/etc/fstab/etc/fstab/etc/fstab/etc/vfstab/etc/fstab
Free disk blocksdf -kdf -kbdfdf -kdf -kdf -k
Device listinglsdev -C /sbin/ioscancat /proc/devicessysdef 
Disk informationbootinfo -s hdisk# fdisk -v ad0diskinfo /dev/rdsk/c#t#d#cat /proc/scsi/scsi0/sda/modelformat -d c#t#d# 
format>current 
format>inquiry
file /dev/rrz0c
Disk Labellspv -l hdisk#disklabel ad0pvdisplay -v /dev/dsk/C#t#d#fdisk -lprtvtocdisklabel -p rz0
LVM ConceptsPartition sub disklogical extentslogical extentssub disksub disk
 VolumeVolumelogical volumelogical volumeVolumeVolume
  Plex  PlexPlex
 Volume group volume groupvolume groupdisk groupdisk group
Journal Filesystem typejfs vxfsext3
reiserfs
vxfsadvfs
Default volume group/dev/rootvg /dev/vg00 /dev/vx/dsk/rootdg/dev/vol/rootdg
Display volume grouplsvg -l rootvg vgdisplay -v vg00vgdisplay -vvxprint -l -g rootdgvolprint -l -g rootdg
Modify physical volumechpv pvchangepvchange  
Prepare physical diskmkdev -c disk -l hdisk# pvcreatepvcreatevxdiskaddvoldiskadd
List physical volumelspvvinum ldpvdisplaypvdisplayvxprint -dlvolprint -dl
Remove disk from volume groupreducevg vgreducevgreducevxdg rmdiskvoldg rmdisk
Move logical volumes to another physical volumesmigratepvvinum move -f drive objectpvmovepvmovevxassist movevolassist move
Create volume groupmkvg vgcreatevgcreatevxdg initvoldg init
Remove volume group  vgremovevgremove  
Volume group availabilitychvg 
varyonvg 
varyoffvg
 vgchangevgchange  
Restore volume group  vgcfgrestorevgcfgrestore  
Exports volume groupexportvg vgexportvgexportvxdg deportvoldg deport
Imports volume groupimportvg vgimportvgimportvxdg importvoldg import
Volume group listinglsvg vgscanvgscan  
Change logical volume characteristics chlv lvchangelvchange vxedit setvoledit set
List logical volumelslvvinum lvlvdisplaylvdisplayvxprint -vlvolprint -vl
Make logical volumemklv lvcreatelvcreatevxassist makevolassist make
Extend logical volumeextendlv lvextendlvextendvxassist growtovolassist growto
Reduce logical volumeAIX reduce LV lvreducelvreducevxassist shrinktovolassist shrinkto
Remove logical volumermlvvinum rm vollvremovelvremovevxedit rmvoledit -g rootdg -rf rm vol1
Prepare boot volumesbootlist -m normal lvlnbootlilovxbootsetup 
Remove boot volumes  lvrmboot   
Extend File systemchfs -a size=# /mt extendfs /dev/vg00/lvol8 
fsadm -F vxfs -b {LE * 1024} /mt
resize2fs
resize_reiserfs
vxva 
mkfs -M
 
Reduce/Split mirrorsrmlvcopy lvsplitlvsplit  
Merge mirrors  lvmergelvmerge  
Create mirrorsmklv -c 2vinum mirror drivelvcreate -m 1 vxassist mirrorvolassist make vol 100mb mirror=true
Add mirrorsmklvcopy lv 2  lvextend -m 1   
Create striped volumesmklv -u 3 -S 64Kvinum stripe drivelvcreate -i 3 -I 64lvcreate -i 3 -I 64vxassist make vol 100mb layout=raid5volassist make vol 100mb layout=stripe
System recovery tapemksysb -i /dev/rmt0 /opt/ignite/bin/make_recovery  /usr/sys/bin/btcreate
Backupsavevg -i rootvgvinum saveconfigfbackuptar cvf /dev/rst0 /ufsdumpvdump
Restorerestvg  frecovertar xvf /dev/rst0 ufsrestorevrestore
MISC
AIX
FreeBSD
HP-UX
LINUX(RedHat)
SOLARIS
Tru64
Startup script/etc/rc/etc/rc/sbin/rc/etc/rc.d/rc/etc/init.d/sbin/init.d
Kernel/usr/lib/boot/unix_up/kernel/stand/vmunix/boot/vmlinuz/kernel/genunix/vmunix
Kernel Parameterslsattr -E -l sys0sysctl -asysdef 
kmtune 
kmsystem
sysctl -asysdef -isysconfig 
dxkerneltuner
Reconfigure the kernel
chdev -l sys0 -a 
cd /sys/i386/conf 
vi KERNEL 
config KERNEL 
cd ../../compile/KERNEL
make depend 
make 
make install
cd /stand/build 
/usr/lbin/sysadm/system_prep -v -s system 
vi system 
mk_kernel -s system 
cd /stand 
mv system system.prev 
mv vmunix vmunix.prev 
mv dlkm dlkm.prev 
mv /stand/build/system system
kmupdate /stand/build/vmunix_test
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 
mkinitrd /boot/initrd-2.2.16.img 2.2.16 
vi /etc/lilo.conf 
lilo

vi /etc/system 
reboot
doconfig
List modulesgenkexkldstatkmadmin -slsmodmodinfo 
Load module kldloadkmadmin -Linsmodmodload 
Unload module kldunloadkmadmin -Urmmodmodunload 
Initialize systeminstall_assist/stand/sysinstallset_parms initialnetconfsys-unconfignetsetup
Physical RAMbootinfo -rsysctl hw.physmemgrep -i Physical /var/adm/syslog/syslog.logfreeprtconfuerf | grep memory
Kernel Bitsbootinfo -K getconf KERNEL_BITSgetconf WORD_BITisainfo -kv64
Crash utilitycrashcrashadblcrashcrashkdbx
Trace System Callssyscallstrusstuscstracetrusstrace
Machine modeluname -m 
bootinfo -m
uname -mmodel 
uname -m
uname -muname -impuname -p
OS Levelosleveluname -runame -runame -runame -rsizer -v
Run Levelwho -r who -rrunlevelwho -rwho -r
Core dump files/var/adm/ras /var/adm/crash /var/crash/`uname -n` 
Boot single userKey on service mode/F4 
Boot from CD/Tape 
Select Maintenance 
Limited function Shell
ok boot -s>boot
Interact with IPL ? Y
ISL>hpux -iS
{lilo}
control-x
linux S

{grub}
c
kernel vmlinuz-2.4.9-13 single   ro root=/dev/hda8
initrd /initrd-2.4.9-13.img
boot
ok boot -s>>> boot -fl s
Maintenance mode ok boot -as>boot
Interact with IPL ? Y
ISL>hpux -lm
 ok boot -as 
Interrupt Key  control-B Stop-Acontrol-P
Return to console  co ok go 
Timezone Management/etc/environment
/etc/profile
/etc/localtime/etc/TIMEZONE/etc/sysconfig/clock/etc/TIMEZONE
/etc/default/init
/etc/svid3_tz
timezone
NTP Daemon/etc/ntp.conf
startsrc -s xntpd
/etc/rc.conf {xntpd_enable="YES"}
/etc/rc.network
/etc/rc.config.d/netdaemons
/sbin/init.d/xntpd
/etc/ntp.conf
/etc/rc.d/init.d/xntpd
/etc/inet/ntp.conf
/etc/init.d/xntpd
rcmgr set XNTPD_CONF YES
/sbin/init.d/xntpd
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值