Embed
Email

阿_unix喊_command_措览钎

Document Sample

Shared by: dandanhuanghuang
Categories
Tags
Stats
views:
0
posted:
1/22/2012
language:
pages:
7
Directory Mappings AIX HP-UX SOLARIS Tru64 FreeBSD LINUX(RedHat)

Root filesystem / {/dev/hd4} / {/dev/vg00/lvol1} / {/dev/vx/dsk/rootvol} / {/dev/rz0a} / {/dev/ad0s1a} / {/dev/sda1}

/export/home

Home Directory /home {/dev/hd1} /home {/dev/vg00/lvol4}

/dev/vx/dsk/home}

/tmp

/tmp {/dev/hd3} /tmp {/dev/vg00/lvol6}

/dev/vx/dsk/swapvol}

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

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

Sample configuration files - /usr/newconfig

User Accounts AIX HP-UX Solaris Tru64 FreeBSD LINUX(RedHat)

/etc/passwd /etc/passwd /etc/passwd /etc/passwd /etc/passwd

Password files /etc/passwd

/etc/security/passwd /tcb/files/auth/r/root /etc/shadow /etc/master.passwd /etc/shadow

/etc/group /etc/group

Groups file /etc/group /etc/group /etc/group /etc/group

/etc/security/group /etc/logingroup

Maximum # of user ID 4294967295 2147483647 2147483647 65535 65535 65535

/etc/security/user /etc/securetty /etc/default/login /etc/securettys /etc/ttys /etc/securetty

Allow/Deny remote login {CONSOLE=/dev/consol

{rlogin=true} {console} {ttyp1} {secure} {ttyp1}

e}

User nobody's id # 4294967294 -2 60001 & 65534(nobody4) 65534 65534 99

Group nobody's id # 4294967294 -2(nogroup) 60002 & 65534(nogroup) 65534 65534 99

press the HALT Button or

boot from CD/Tape >boot boot cdrom -s ok boot -s {lilo}

(Control-P)

Installation/Maintenance Interact with IPL ? Y mkdir /tmp/a >>>boot -fl s passwd root control-x

mount /dev/c0t0d0s0

Start Limited Shell ISL>hpux -iS lsmbstartup linux S

/tmp/a

getrootfs hdisk0 passwd root vi /tmp/a/etc/shadow /sbin/bcheckrc passwd root

vi /etc/security/passwd passwd root

Recover root password {grub}

c

kernel vmlinuz-2.4.9-

13 single

ro root=/dev/hda8

initrd /initrd-2.4.9-13.img

boot

passwd root

Create new user mkuser useradd useradd useradd adduser useradd

Delete user rmuser userdel userdel userdel rmuser userdel

List users lsuser -f ALL logins logins

Modify user account chuser -a usermod usermod usermod usermod

General Commands AIX HP-UX Solaris Tru64 FreeBSD LINUX(RedHat)

Unique host ID hostid uname -i hostid hostid hostid

Administrator smit sam admintool linuxconf









c6367717-a62c-4bb0-a07b-b0129a5a604a.xls 1페이지

top top

Performance monitor top top top top

monitor glance

System activity reporter sar sar sar /usr/opt/svr4/bin/sar sa sar {sysstat}

Virtual Memory statistics vmstat vmstat vmstat vmstat vmstat vmstat

I/O statistics iostat iostat iostat iostat iostat iostat {sysstat}

alog -o -t boot

Error logs dmesg dmesg uerf -R -o full dmesg dmesg

errpt

Physical RAM 1TB 4TB 16TB 4TB 64 GB {>2.3.24}

Shared Memory 2.75GB 8TB sysctl kernel.shmmax

Process Data Space 2GB 4GB 900 MB

Swap device /dev/hd6 /dev/vg00/lvol2 /dev/vx/dsk/swapvol /dev/rz0b /dev/ad0s1b /dev/sda2

Swap file type /etc/swapspaces swap swap raw swap partition type 82

Display swap size lsps -a swapinfo -a swap -l swapon -s swapinfo free

Activate Swap swapon -a swapon -a swap -a swapon -a swapon -a swapon -a

Printers AIX HP-UX Solaris Tru64 FreeBSD LINUX

Printer Queues /etc/qconfig /etc/lp/interface/* /etc/lp/interfaces/* /usr/spool/lpd /var/spool/print /var/spool/lpd/lp/*

Stop LP stopsrc -s lpd lpshut /usr/lib/lp/lpshut /sbin/init.d/lpd stop /etc/init.d/lpd stop

Start LP startsrc -s lpd lpsched /usr/lib/lp/lpsched /sbin/init.d/lpd start lpd /etc/init.d/lpd start

enq lp lp

lp lpr lpr

Submit print jobs lp lp lpr

lpr

qprt

enq -A

lpq

LP statistics lpstat lpstat lpstat lpq lpq

lpstat

qchk

cancel cancel cancel cancel

lprm lprm lprm lprm

Remove print jobs cancel lprm

qcan

enq -x

Add printer queue smit mkpq lpadmin -p pq lpadmin -p pq lprsetup printtool

Remove Printer queue smit rmpq lpadmin -x pq lpadmin -x pq lprsetup

Make default printer export LPDEST="pq" lpadmin -d pq lpadmin -d pq export PRINTER="lp"

TCP/IP AIX HP-UX Solaris Tru64 LINUX(RedHat)

/etc/hostname.*

/etc/sysconfig/network-

Network IP configuration lsattr -E -l inet0 /etc/rc.config.d/netconf /etc/inet/* /etc/rc.config /etc/rc.conf

scripts/

/etc/defaultrouter

Hosts IP addresses /etc/hosts /etc/hosts /etc/inet/hosts /etc/hosts /etc/hosts /etc/hosts

Name service switch /etc/netsvc.conf /etc/nsswitch.conf /etc/nsswitch.conf /etc/svc.conf /etc/host.conf /etc/nsswitch.conf

Network parameters no -a ndd -h ndd /dev/[tcp|ip] ? sysctl sysctl -a | grep net

Routing daemon gated gated in.routed routed routed routed

NIC Configurations ifconfig -a lanscan -v ifconfig -a ifconfig -a ifconfig -a ifconfig -a









c6367717-a62c-4bb0-a07b-b0129a5a604a.xls 2페이지

modprobe ip_alias

Secondary IP Address ifconfig en0 alias IP ifconfig lan0:1 IP ifconfig hme0:1 IP up ifconfig ln0 alias ifconfig xl0 alias IP

ifconfig eth0:1 IP

HERALD @ BANNER @

Login prompt telnetd -b /etc/issue /etc/issue /etc/issue

/etc/security/login.cfg /etc/default/telnetd

odmget -q "attribute=num and

rebuild your kernel with these new

uniquetype=pty/pty/pty" PdAt | sed {/etc/system} cd /dev cd /dev

values NPTY=#

"s/0-64/0-512/" |

odmchange -q "attribute=num and

NSTRPY=# set pt_cnt = # {SYSV} ./MAKEDEV PTY_1 ./MAKEDEV -v pty

uniquetype=pty/pty/pty" -o PdAt

set npty = # {BSD}

Increase the # of pseudo-terminals

chdev -l pty0 -anum=256 -P reboot

reboot {/etc/iu.ap}

insf -d ptys -n # ptsl 0 # ldterm ttcompat

insf -d ptym -n #

insf -d pts -s # -e -v halt

boot -r

176 {BSD}

Maximum # of ptys 512 {MAXUSERS} 8192 256

3000 {SYSV}

remsh

Remote Shell remsh rsh rsh rsh rsh

rsh

YP/NIS service binder /usr/lib/netsvc/yp/ypbind /usr/lib/netsvc/yp/ypbind /usr/lib/netsvc/yp/ypbind /usr/sbin/ypbind /usr/sbin/ypbind /sbin/ypbind

System Files AIX HP-UX Solaris Tru64 FreeBSD LINUX(RedHat)

/etc/dfs/dfstab

NFS exported /etc/exports /etc/exports /etc/exports /etc/exports /etc/exports

/etc/dfs/sharetab

NFS Client mounted directories /etc/xtab /etc/xtab /etc/rmtab /var/adm/mountdtab /var/lib/nfs/xtab

1 TB 128 GB {= 4.0} 2 TB

16 TB {advfs}

1 TB 128 GB {= 4.0} 8192 GB {8KB block size}

16 TB {advfs}

Max # File Descriptors 64 K 60~ K 64 K 64 K sysctl fs.file-max

DISK/LVM Commands AIX HP-UX:Disk &Filesystem SOLARIS Tru64 FreeBSD LINUX(RedHat)

Filesystem table /etc/filesystems /etc/fstab /etc/vfstab /etc/fstab /etc/fstab /etc/fstab

Free disk blocks df -k bdf df -k df -k df -k df -k

Device listing lsdev -C /sbin/ioscan sysdef cat /proc/devices

format -d c#t#d#

cat

Disk information bootinfo -s hdisk# diskinfo /dev/rdsk/c#t#d# format>current file /dev/rrz0c fdisk -v ad0

/proc/scsi/scsi0/sda/model

format>inquiry

Disk Label lspv -l hdisk# pvdisplay -v /dev/dsk/C#t#d# prtvtoc disklabel -p rz0 disklabel ad0 fdisk -l

LVM Concepts Partition logical extents sub disk sub disk sub disk logical extents

Volume logical volume Volume Volume Volume logical volume









c6367717-a62c-4bb0-a07b-b0129a5a604a.xls 3페이지

Plex Plex Plex

Volume group volume group disk group disk group volume group



ext3

Journal Filesystem type jfs vxfs vxfs advfs

reiserfs

Default volume group /dev/rootvg /dev/vg00 /dev/vx/dsk/rootdg /dev/vol/rootdg

Display volume group lsvg -l rootvg vgdisplay -v vg00 vxprint -l -g rootdg volprint -l -g rootdg vgdisplay -v

Modify physical volume chpv pvchange pvchange

Prepare physical disk mkdev -c disk -l hdisk# pvcreate vxdiskadd voldiskadd pvcreate

List physical volume lspv pvdisplay vxprint -dl volprint -dl vinum ld pvdisplay

Remove disk from volume group reducevg vgreduce vxdg rmdisk voldg rmdisk vgreduce

Move logical volumes to another

migratepv pvmove vxassist move volassist move vinum move -f drive object pvmove

physical volumes

Create volume group mkvg vgcreate vxdg init voldg init vgcreate

Remove volume group vgremove vgremove

chvg

Volume group availability varyonvg vgchange vgchange

varyoffvg

Restore volume group vgcfgrestore vgcfgrestore

Exports volume group exportvg vgexport vxdg deport voldg deport vgexport

Imports volume group importvg vgimport vxdg import voldg import vgimport

Volume group listing lsvg vgscan vgscan

Change logical volume characteristics chlv lvchange vxedit set voledit set lvchange

List logical volume lslv lvdisplay vxprint -vl volprint -vl vinum lv lvdisplay

Make logical volume mklv lvcreate vxassist make volassist make lvcreate

Extend logical volume extendlv lvextend vxassist growto volassist growto lvextend

Reduce logical volume AIX reduce LV lvreduce vxassist shrinkto volassist shrinkto lvreduce

Remove logical volume rmlv lvremove vxedit rm voledit -g rootdg -rf rm vol1 vinum rm vol lvremove

Prepare boot volumes bootlist -m normal lvlnboot vxbootsetup lilo

Remove boot volumes lvrmboot

extendfs /dev/vg00/lvol8 vxva resize2fs

Extend File system chfs -a size=# /mt

fsadm -F vxfs -b {LE * 1024} /mt mkfs -M resize_reiserfs

Reduce/Split mirrors rmlvcopy lvsplit lvsplit

Merge mirrors lvmerge lvmerge

volassist make vol 100mb

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

mirror=true

Add mirrors mklvcopy lv 2 lvextend -m 1

vxassist make vol 100mb volassist make vol 100mb

Create striped volumes mklv -u 3 -S 64K lvcreate -i 3 -I 64 vinum stripe drive lvcreate -i 3 -I 64

layout=raid5 layout=stripe

System recovery tape mksysb -i /dev/rmt0 /opt/ignite/bin/make_recovery /usr/sys/bin/btcreate

Backup savevg -i rootvg fbackup ufsdump vdump vinum saveconfig tar cvf /dev/rst0 /

Restore restvg frecover ufsrestore vrestore tar xvf /dev/rst0

MISC AIX HP-UX SOLARIS Tru64 FreeBSD LINUX(RedHat)









c6367717-a62c-4bb0-a07b-b0129a5a604a.xls 4페이지

Startup script /etc/rc /sbin/rc /sbin/init.d /sbin/init.d /etc/rc /etc/rc.d/rc

Kernel /usr/lib/boot/unix_up /stand/vmunix /kernel/genunix /vmunix /kernel /boot/vmlinuz

sysdef sysconfig

Kernel Parameters lsattr -E -l sys0 kmtune sysdef -i dxkerneltuner sysctl -a sysctl -a

kmsystem

cd /stand/build vi /etc/system cd /sys/i386/conf cd /usr/src/linux

/usr/lbin/sysadm/system_prep -v -

reboot vi KERNEL make mrproper 

s system

vi system config KERNEL make menuconfig 

mk_kernel -s system cd ../../compile/KERNEL make dep 

cd /stand make depend make clean 

mv system system.prev make make bzimage

mv vmunix vmunix.prev make install make install

mv dlkm dlkm.prev make modules

Reconfigure the kernel chdev -l sys0 -a mv /stand/build/system system doconfig make modules_install

kmupdate

/stand/build/vmunix_test

cp

arch/i386/boot/bzImag

e /boot/vmlinuz-2.2.16

mkinitrd /boot/initrd-

2.2.16.img 2.2.16

vi /etc/lilo.conf

lilo



List modules genkex kmadmin -s modinfo kldstat lsmod

Load module kmadmin -L modload kldload insmod

Unload module kmadmin -U modunload kldunload rmmod

Initialize system install_assist set_parms initial sys-unconfig netsetup /stand/sysinstall netconf

grep -i Physical

Physical RAM bootinfo -r prtconf uerf | grep memory sysctl hw.physmem free

/var/adm/syslog/syslog.log

Kernel Bits bootinfo -K getconf KERNEL_BITS isainfo -kv 64 getconf WORD_BIT

Crash utility crash adb crash kdbx crash lcrash

Trace System Calls syscalls tusc truss trace truss strace

uname -m model

Machine model uname -imp uname -p uname -m uname -m

bootinfo -m uname -m

OS Level oslevel uname -r uname -r sizer -v uname -r uname -r

Run Level who -r who -r who -r who -r runlevel

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

Key on service mode/F4 >boot {lilo}

Boot from CD/Tape Interact with IPL ? Y control-x

Select Maintenance ISL>hpux -iS linux S

Limited function Shell



Boot single user ok boot -s >>> boot -fl s ok boot -s









c6367717-a62c-4bb0-a07b-b0129a5a604a.xls 5페이지

{grub}

Boot single user ok boot -s >>> boot -fl s ok boot -s c

kernel vmlinuz-2.4.9-

13 single

ro root=/dev/hda8

initrd /initrd-2.4.9-13.img

boot

>boot

Maintenance mode Interact with IPL ? Y ok boot -as ok boot -as

ISL>hpux -lm

Interrupt Key control-B Stop-A control-P

Return to console co ok go

/etc/environment /etc/TIMEZONE /etc/svid3_tz

Timezone Management /etc/TIMEZONE /etc/localtime /etc/sysconfig/clock

/etc/profile /etc/default/init timezone

rcmgr set XNTPD_CONF YE /etc/rc.conf

/etc/ntp.conf /etc/rc.config.d/netdaemons /etc/inet/ntp.conf /etc/ntp.conf

NTP Daemon S {xntpd_enable="YES"}

startsrc -s xntpd /sbin/init.d/xntpd /etc/init.d/xntpd /sbin/init.d/xntpd /etc/rc.network /etc/rc.d/init.d/xntpd

Software AIX HP-UX SOLARIS Tru64 LINUX(RedHat)

Install Software installp -a swinstall pkgadd setld -l pkg_add rpm -i package

Uninstall software installp -u swremove pkgrm setld -d pkg_delete rpm -e package

List installed software lslpp -L all swlist pkginfo setld -i pkg_info -a rpm -qa

pkginfo -i

Verify installed software lppchk -v swlist -l fileset -a state setld -v rpm -V package

pkginfo -p

List all files lslpp -f fileset swlist -l file fileset pkgchk -l package setld -i package pkg_info -L package rpm -ql package

swlist -l patch

List installed patches instfix -i patchadd -p dupatch -track -type patch

what /stand/vmunix

Package owner lslpp -w path swlist -l file | grep path pkgchk -l -p path rpm -qf file

SW Directory /usr/lpp /var/adm/sw/ /var/sadm /var/adm/smlogs /var/db/pkg /var/lib/rpm

Devices AIX HP-UX SOLARIS Tru64 FreeBSD LINUX(RedHat)

Devices /dev /dev /devices /dev /dev /dev

drvconfig scu scan edt

devlinks scsimgr -scan_all

Install devices for attached peripherals cfgmgr -v insf -e disks /dev/MAKEDEV /dev/MAKEDEV

tapes

ports

Remove device rmdev -l rmsf rem_drv

Device drivers lscfg lsdev prtconf -D

CPU lsdev -Cc processor ioscan -fnC processor psrinfo -v psrinfo -v sysctl hw.model cat /proc/cpuinfo

List Terminal lsdev -Cc tty ioscan -fnC tty pmadm -l

/usr/platform/`uname - lspci

sbin/prtdiag pnpdump

Diagnostics diag stm pciconf -l

ok test-all









c6367717-a62c-4bb0-a07b-b0129a5a604a.xls 6페이지

Diagnostics diag stm pciconf -l



/opt/SUNWvts/bin/sunvts

Whole Disk /dev/hdisk# /dev/dsk/c#t#d0 /dev/c#t#d0s2 /dev/rz0c /dev/ad0s1c /dev/sda

CDROM /dev/cd0 /dev/dsk/c#t2d0 /dev/dsk/c#t6d0s2 /dev/rz3c /dev/acd0c /dev/cdrom

CDROM file type cdrfs cdfs hsfs cdfs cd9660 iso9660

Rewinding tape drive /dev/rmt0 /dev/rmt/0m /dev/rmt/0 /dev/rmt0 /dev/rwt0d /dev/rst0 { c 9 0}

Non-rewinding tape drive /dev/rmt0.1 /dev/rmt/0mn /dev/rmt/0n /dev/nrmt0 /dev/nrwt0d /dev/nrst0 { c 9 128 }

Floppy drive /dev/rfd0 - /dev/diskette /dev/fd0c /dev/fd0 /dev/fd0

Links AIX HP-UX SOLARIS Tru64 FreeBSD LINUX(RedHat)

FAQ AIX-FAQ HP-UX FAQ Solaris 2 FAQ Tru64 FAQ FreeBSD FAQ LINUX FAQ

Solaris 7 Linux Documentation

Online Manual AIX 4.3 Books HP-UX 11.00 Collection Tru64 Documents FreeBSD Hand Book

Documentation Project

Technical Support RS/6000 TechSupport IT Resource Center SunSolve Alpha Systems Support Red Hat support

Phone Number 1-800-CALL-AIX 1-800-633-3600 1-800-USA-4SUN 1-888-REDHAT1

Tru64 Demos, Shareware

Free Software Bull HP-UX Ports Sun Freeware FreeBSD Primary Site Linux Software Map

& Freeware

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









c6367717-a62c-4bb0-a07b-b0129a5a604a.xls 7페이지



Related docs
Other docs by dandanhuanghua...
Company History and Mission
Views: 0  |  Downloads: 0
Metrics
Views: 6  |  Downloads: 0
OKdirectory
Views: 0  |  Downloads: 0
Deedrestrictions_100205b
Views: 0  |  Downloads: 0
ANNEXE 3 SOLDE COMMANDE.ppt
Views: 0  |  Downloads: 0
NKP_SI_ZD_P06
Views: 0  |  Downloads: 0
Cross-Border Securitizations
Views: 0  |  Downloads: 0
Let's Go Shopping
Views: 0  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!