Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

阿_unix喊_command_措览钎

VIEWS: 6 PAGES: 12

									           Directory Mappings                          AIX                                  HP-UX                           SOLARIS                           Tru64                       FreeBSD
Root filesystem                  /              {/dev/hd4}                /          {/dev/vg00/lvol1}            /  {/dev/vx/dsk/rootvol}     /     {/dev/rz0a}               /        {/dev/ad0s1a}
                                                                                                                  /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
                                 /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/group                               /etc/group
Groups file                                                                                                       /etc/group                   /etc/group                      /etc/group
                                 /etc/security/group                      /etc/logingroup
Maximum # of user ID                                         4294967295                              2147483647                   2147483647                           65535                            65535
                                 /etc/security/user                       /etc/securetty                        /etc/default/login        /etc/securettys                      / etc/ttys 
Allow/Deny remote login
                                 {rlogin=true}                            {console}                             {CONSOLE=/dev/console} {ttyp1}                                 {secure}
User nobody's id #                                           4294967294                                      -2 60001 & 65534(nobody4)                            65534                                 65534
Group nobody's id #                                          4294967294 -2(nogroup)                             60002 & 65534(nogroup) 65534                                                            65534
                                 boot from CD/Tape                        >boot                                 boot cdrom -s             press the HALT Button or             ok boot -s
                                                                                                                                          (Control-P)
                                 Installation/Maintenance                 Interact with IPL ? Y                 mkdir /tmp/a              >>>boot -fl s                        passwd root
                                 Start Limited Shell                      ISL>hpux -iS                          mount /dev/c0t0d0s0 /tmp/ lsmbstartup
                                                                                                                a
                                 getrootfs hdisk0                         passwd root                           vi /tmp/a/etc/shadow      /sbin/bcheckrc
                                 vi /etc/security/passwd                                                                                  passwd root
Recover root password




Create new user                  mkuser                                   useradd                                 useradd                      useradd                         adduser
Delete user                      rmuser                                   userdel                                 userdel                      userdel                         rmuser
List users                       lsuser -f ALL                            logins                                  logins
Modify user account              chuser -a                                usermod                                 usermod                      usermod
           General Commands                          AIX                                   HP-UX                              Solaris                         Tru64                       FreeBSD
Unique host ID                   hostid                                   uname -i                                hostid                       hostid
Administrator                    smit                                     sam                                     admintool
                                 top                                      top
Performance monitor                                                                                               top                          top                             top
                                 monitor                                  glance
System activity reporter         sar                                      sar                                     sar                          /usr/opt/svr4/bin/sar           sa
Virtual Memory statistics        vmstat                                   vmstat                                  vmstat                       vmstat                          vmstat
I/O statistics                   iostat                                   iostat                                  iostat                       iostat                          iostat
                                 alog -o -t boot
Error logs                                                                dmesg                                   dmesg                        uerf -R -o full                 dmesg
                                 errpt
Physical RAM                     1TB                                      4TB                                     16TB                         4TB
Shared Memory                    2.75GB                                   8TB



                                                                                                                                                                                                                1페이지
Process Data Space                   2GB                                  4GB
Swap device                          /dev/hd6                             /dev/vg00/lvol2                      /dev/vx/dsk/swapvol        /dev/rz0b                / dev/ad0s1b
Swap file type                       /etc/swapspaces                      swap                                 swap                       raw                      swap
Display swap size                    lsps -a                              swapinfo -a                          swap -l                    swapon -s                swapinfo
Activate Swap                        swapon -a                            swapon -a                            swap -a                    swapon -a                swapon -a
                Printers                             AIX                                  HP-UX                            Solaris                       Tru64              FreeBSD
Printer Queues                       /etc/qconfig                         /etc/lp/interface/*                  /etc/lp/interfaces/*       /usr/spool/lpd           /var/spool/print
Stop LP                              stopsrc -s lpd                       lpshut                               /usr/lib/lp/lpshut         /sbin/init.d/lpd stop
Start LP                             startsrc -s lpd                      lpsched                              /usr/lib/lp/lpsched        /sbin/init.d/lpd start   lpd
                                     enq                                                                       lp                         lp
                                     lp                                                                        lpr                        lpr
Submit print jobs                                                         lp                                                                                       lp
                                     lpr
                                     qprt
                                     enq -A
                                     lpq
LP statistics                                                             lpstat                               lpstat                     lpstat                   lpq
                                     lpstat
                                     qchk
                                     cancel                                                                    cancel                     cancel                   cancel
                                     lprm                                                                      lprm                       lprm                     lprm
Remove print jobs                                                         cancel
                                     qcan
                                     enq -x
Add printer queue                    smit mkpq                            lpadmin -p pq                        lpadmin -p pq              lprsetup
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
                                                                                                               /etc/hostname.*
Network IP configuration             lsattr -E -l inet0                   /etc/rc.config.d/netconf             /etc/inet/*                /etc/rc.config           /etc/rc.conf
                                                                                                               /etc/defaultrouter
Hosts IP addresses                   /etc/hosts                           /etc/hosts                           /etc/inet/hosts            /etc/hosts               /etc/hosts
Name service switch                  /etc/netsvc.conf                     /etc/nsswitch.conf                   /etc/nsswitch.conf         /etc/svc.conf            /etc/host.conf
Network parameters                   no -a                                ndd -h                               ndd /dev/[tcp|ip] ?                                 sysctl
Routing daemon                       gated                                gated                                in.routed                  routed                   routed
NIC Configurations                   ifconfig -a                          lanscan -v                           ifconfig -a                ifconfig -a              ifconfig -a
Secondary IP Address                 ifconfig en0 alias IP                ifconfig lan0:1 IP                   ifconfig hme0:1 IP up      ifconfig ln0 alias       ifconfig xl0 alias 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 these new
                                     uniquetype=pty/pty/pty" PdAt | sed                                        {/etc/system}              cd /dev
                                                                          values NPTY=# 
                                     "s/0-64/0-512/" |
                                     odmchange -q "attribute=num and      NSTRPY=#                             set pt_cnt = #   {SYSV}    ./MAKEDEV PTY_1
                                     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



                                                                                                                                                                                           2페이지
                                                                                                       176                {BSD}
Maximum # of ptys                          512                          {MAXUSERS}                                                 8192
                                                                                                       3000              {SYSV}
                                           remsh
Remote Shell                                                            remsh                          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
             System Files                                    AIX                        HP-UX                     Solaris                       Tru64                FreeBSD
                                                                                                       /etc/dfs/dfstab
NFS exported                               /etc/exports                 /etc/exports                                               /etc/exports            /etc/exports
                                                                                                       /etc/dfs/sharetab
NFS Client mounted directories             /etc/xtab                    /etc/xtab                      /etc/rmtab                  /var/adm/mountdtab
                                                                                                       1 TB                        128 GB {<= 3.2G}
Max File System                            128 GB                       128 GB                         8000 TB {vxfs}              512 GB {>= 4.0}
                                                                                                                                   16 TB {advfs}
                                                                                                       1 TB                        128 GB {<= 3.2G}
Max File Size                              64 GB                        128 GB                         2 GB {=<2.5.1}              512 GB {>= 4.0}
                                                                                                                                   16 TB {advfs}
Max # File Descriptors                     64 K                         60~ K                          64 K                        64 K
          DISK/LVM Commands                                   AIX       HP-UX:Disk &Filesystem                  SOLARIS                        Tru64                 FreeBSD
Filesystem table                           /etc/filesystems             /etc/fstab                     /etc/vfstab                 /etc/fstab              /etc/fstab
Free disk blocks                           df -k                        bdf                            df -k                       df -k                   df -k
Device listing                             lsdev -C                     /sbin/ioscan                   sysdef
                                                                                                       format -d c#t#d#
Disk information                           bootinfo -s hdisk#           diskinfo /dev/rdsk/c#t#d#      format>current              file /dev/rrz0c         fdisk -v ad0
                                                                                                       format>inquiry
Disk Label                                 lspv -l hdisk#               pvdisplay -v /dev/dsk/C#t#d#   prtvtoc                     disklabel -p rz0        disklabel ad0
LVM Concepts                               Partition                    logical extents                sub disk                    sub disk                sub disk
                                           Volume                       logical volume                 Volume                      Volume                  Volume
                                                                                                       Plex                        Plex                    Plex
                                           Volume group                 volume group                   disk group                  disk group

Journal Filesystem type                    jfs                          vxfs                           vxfs                        advfs

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
Modify physical volume                     chpv                         pvchange
Prepare physical disk                      mkdev -c disk -l hdisk#      pvcreate                       vxdiskadd                   voldiskadd
List physical volume                       lspv                         pvdisplay                      vxprint -dl                 volprint -dl            vinum ld
Remove disk from volume group              reducevg                     vgreduce                       vxdg rmdisk                 voldg rmdisk
Move logical volumes to another physical   migratepv                    pvmove                         vxassist move               volassist move          vinum move -f drive object
volumes
Create volume group                        mkvg                         vgcreate                       vxdg init                   voldg init
Remove volume group                                                     vgremove
                                           chvg
Volume group availability                  varyonvg                     vgchange
                                           varyoffvg
Restore volume group                                                    vgcfgrestore
Exports volume group                       exportvg                     vgexport                       vxdg deport                 voldg deport
Imports volume group                       importvg                     vgimport                       vxdg import                 voldg import
Volume group listing                       lsvg                         vgscan
Change logical volume characteristics      chlv                         lvchange                       vxedit set                  voledit set




                                                                                                                                                                                        3페이지
List logical volume      lslv                    lvdisplay                           vxprint -vl             volprint -vl                    vinum lv
Make logical volume      mklv                    lvcreate                            vxassist make           volassist make
Extend logical volume    extendlv                lvextend                            vxassist growto         volassist growto
Reduce logical volume    AIX reduce LV           lvreduce                            vxassist shrinkto       volassist shrinkto
Remove logical volume    rmlv                    lvremove                            vxedit rm               voledit -g rootdg -rf rm vol1   vinum rm vol
Prepare boot volumes     bootlist -m normal      lvlnboot                            vxbootsetup
Remove boot volumes                              lvrmboot
                                                 extendfs /dev/vg00/lvol8            vxva
Extend File system       chfs -a size=# /mt
                                                 fsadm -F vxfs -b {LE * 1024} /mt    mkfs -M
Reduce/Split mirrors     rmlvcopy                lvsplit
Merge mirrors                                    lvmerge
Create mirrors           mklv -c 2               lvcreate -m 1                       vxassist mirror         volassist make vol 100mb        vinum mirror drive
                                                                                                             mirror=true
Add mirrors              mklvcopy lv 2           lvextend -m 1
Create striped volumes   mklv -u 3 -S 64K        lvcreate -i 3 -I 64                 vxassist make vol 100mb volassist make vol 100mb        vinum stripe drive
                                                                                     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
Restore                  restvg                  frecover                            ufsrestore              vrestore
                MISC                       AIX                   HP-UX                         SOLARIS                    Tru64                          FreeBSD
Startup script           /etc/rc                 /sbin/rc                            /sbin/init.d            /sbin/init.d                    / etc/rc
Kernel                   /usr/lib/boot/unix_up   /stand/vmunix                       /kernel/genunix         /vmunix                         /kernel
                                                 sysdef                                                      sysconfig
Kernel Parameters        lsattr -E -l sys0       kmtune                              sysdef -i               dxkerneltuner                   sysctl -a
                                                 kmsystem
                                                 cd /stand/build                    vi /etc/system                                           cd /sys/i386/conf
                                                 /usr/lbin/sysadm/system_prep -v -s reboot                                                   vi KERNEL
                                                 system
                                                 vi system                                                                                   config KERNEL
                                                 mk_kernel -s system                                                                         cd ../../compile/KERNEL
                                                 cd /stand                                                                                   make depend
                                                 mv system system.prev                                                                       make
                                                 mv vmunix vmunix.prev                                                                       make install
                                                 mv dlkm dlkm.prev
                                                 mv /stand/build/system system
Reconfigure the kernel   chdev -l sys0 -a                                                                    doconfig
                                                 kmupdate /stand/build/vmunix_test




List modules             genkex                  kmadmin -s                          modinfo                                                 kldstat
Load module                                      kmadmin -L                          modload                                                 kldload
Unload module                                    kmadmin -U                          modunload                                               kldunload
Initialize system        install_assist          set_parms initial                   sys-unconfig            netsetup                        /stand/sysinstall




                                                                                                                                                                       4페이지
Physical RAM                               bootinfo -r               grep -i Physical /var/adm/syslog/   prtconf                 uerf | grep memory           sysctl hw.physmem
                                                                     syslog.log
Kernel Bits                                bootinfo -K               getconf KERNEL_BITS                 isainfo -kv             64
Crash utility                              crash                     adb                                 crash                   kdbx                         crash
Trace System Calls                         syscalls                  tusc                                truss                   trace                        truss
                                           uname -m                  model
Machine model                                                                                            uname -imp              uname -p                     uname -m
                                           bootinfo -m               uname -m
OS Level                                   oslevel                   uname -r                            uname -r                sizer -v                     uname -r
Run Level                                  who -r                    who -r                              who -r                  who -r
Core dump files                            /var/adm/ras              /var/adm/crash                      /var/crash/`uname -n`
                                           Key on service mode/F4    >boot
                                           Boot from CD/Tape         Interact with IPL ? Y
                                           Select Maintenance        ISL>hpux -iS
                                           Limited function Shell
Boot single user                                                                                         ok boot -s              >>> boot -fl s               ok boot -s




                                                                     >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/profile                                                  /etc/default/init       timezone
                                           /etc/ntp.conf             /etc/rc.config.d/netdaemons         /etc/inet/ntp.conf      rcmgr set XNTPD_CONF YES /etc/rc.conf
NTP Daemon                                                                                                                                                {xntpd_enable="YES"}
                                           startsrc -s xntpd         /sbin/init.d/xntpd                  /etc/init.d/xntpd       /sbin/init.d/xntpd       /etc/rc.network
                  Software                                     AIX                   HP-UX                         SOLARIS                      Tru64
Install Software                           installp -a               swinstall                           pkgadd                  setld -l                 pkg_add
Uninstall software                         installp -u               swremove                            pkgrm                   setld -d                 pkg_delete
List installed software                    lslpp -L all              swlist                              pkginfo                 setld -i                 pkg_info -a
                                                                                                         pkginfo -i
Verify installed software                  lppchk -v                 swlist -l fileset -a state                                  setld -v
                                                                                                         pkginfo -p
List all files                             lslpp -f fileset          swlist -l file fileset              pkgchk -l package       setld -i package             pkg_info -L 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
SW Directory                               /usr/lpp                  /var/adm/sw/                        /var/sadm               /var/adm/smlogs              /var/db/pkg
                   Devices                                     AIX                      HP-UX                     SOLARIS                    Tru64                     FreeBSD
Devices                                    /dev                      /dev                                /devices                /dev                         /dev
                                                                                                         drvconfig               scu scan edt
                                                                                                         devlinks                scsimgr -scan_all
Install devices for attached peripherals   cfgmgr -v                 insf -e                             disks                                                /dev/MAKEDEV
                                                                                                         tapes
                                                                                                         ports




                                                                                                                                                                                    5페이지
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
List Terminal              lsdev -Cc tty          ioscan -fnC tty          pmadm -l
                                                                           /usr/platform/`uname -m`/
                                                                           sbin/prtdiag
Diagnostics                diag                   stm                                                                          pciconf -l
                                                                           ok test-all
                                                                           /opt/SUNWvts/bin/sunvts
Whole Disk                 /dev/hdisk#            /dev/dsk/c#t#d0          /dev/c#t#d0s2               /dev/rz0c               /dev/ad0s1c
CDROM                      /dev/cd0               /dev/dsk/c#t2d0          /dev/dsk/c#t6d0s2           /dev/rz3c               /dev/acd0c
CDROM file type            cdrfs                  cdfs                     hsfs                        cdfs                    cd9660
Rewinding tape drive       /dev/rmt0              /dev/rmt/0m              /dev/rmt/0                  /dev/rmt0               /dev/rwt0d
Non-rewinding tape drive   /dev/rmt0.1            /dev/rmt/0mn             /dev/rmt/0n                 /dev/nrmt0              /dev/nrwt0d
Floppy drive               /dev/rfd0              -                        /dev/diskette               /dev/fd0c               /dev/fd0
Links                                       AIX                 HP-UX                SOLARIS                        Tru64               FreeBSD
FAQ                        AIX-FAQ                HP-UX FAQ                Solaris 2 FAQ               Tru64 FAQ               FreeBSD FAQ
Online Manual                                                              Solaris 7
                           AIX 4.3 Books          HP-UX 11.00 Collection                               Tru64 Documents         FreeBSD Hand Book
                                                                           Documentation
Technical Support          RS/6000 TechSupport    IT Resource Center       SunSolve                    Alpha Systems Support
Phone Number               1-800-CALL-AIX         1-800-633-3600           1-800-USA-4SUN
Free Software                                                                                          Tru64 Demos, Shareware
                           Bull                   HP-UX Ports              Sun Freeware                                       FreeBSD Primary Site
                                                                                                       & Freeware
Certification              www.ibm.com            education.hp.com         suned.sun.com               ASE Information




                                                                                                                                                     6페이지
          LINUX(RedHat)
/                  {/dev/sda1}




       LINUX(RedHat)
/etc/passwd
/etc/shadow
/etc/group
                            65535
/etc/securetty
{ttyp1}
                                 99
99
{lilo}
control-x
linux S
passwd root

{grub}
c
kernel vmlinuz-2.4.9-
13 single   ro root=/dev/hda8
initrd /initrd-2.4.9-13.img
boot
passwd root
useradd
userdel

usermod
       LINUX(RedHat)
hostid
linuxconf
top
sar {sysstat}
vmstat
iostat {sysstat}
dmesg 
64 GB {>2.3.24}
sysctl kernel.shmmax



                                      7페이지
900 MB
/dev/sda2
partition type 82 
free
swapon -a
              LINUX
/var/spool/lpd/lp/*
/etc/init.d/lpd stop
/etc/init.d/lpd start


lpr




lpq




lprm


printtool


        LINUX(RedHat)
/etc/sysconfig/network-
scripts/ 
/etc/hosts
/etc/nsswitch.conf
sysctl -a | grep net
routed
ifconfig -a
modprobe ip_alias
ifconfig eth0:1 IP
/etc/issue


cd /dev

./MAKEDEV -v pty




                          8페이지
256

rsh
/sbin/ypbind
       LINUX(RedHat)
/etc/exports
/var/lib/nfs/xtab

2 TB 

2 GB     {512B block size} 
8192 GB  {8KB block size} 

sysctl fs.file-max
        LINUX(RedHat)
/etc/fstab
df -k
cat /proc/devices
cat /proc/scsi/scsi0/sda/
model
fdisk -l
logical extents
logical volume

volume group
ext3
reiserfs

vgdisplay -v
pvchange
pvcreate
pvdisplay
vgreduce
pvmove
vgcreate
vgremove

vgchange

vgcfgrestore
vgexport
vgimport
vgscan
lvchange 




                              9페이지
lvdisplay
lvcreate
lvextend
lvreduce
lvremove
lilo

resize2fs
resize_reiserfs
lvsplit
lvmerge




lvcreate -i 3 -I 64


tar cvf /dev/rst0 /
tar xvf /dev/rst0 
        LINUX(RedHat)
/etc/rc.d/rc
/boot/vmlinuz

sysctl -a

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

lsmod
insmod
rmmod
netconf




                          10페이지
free
getconf WORD_BIT
lcrash
strace
uname -m
uname -r
runlevel

{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




/etc/sysconfig/clock

/etc/ntp.conf
/etc/rc.d/init.d/xntpd
        LINUX(RedHat)
rpm -i package
rpm -e package
rpm -qa

rpm -V package

rpm -ql package


rpm -qf file
/var/lib/rpm
        LINUX(RedHat)
/dev


/dev/MAKEDEV




                                11페이지
cat /proc/cpuinfo

lspci
pnpdump


/dev/sda
/dev/cdrom
iso9660
/dev/rst0               { c 9 0}
/dev/nrst0           { c 9 128 }
/dev/fd0
       LINUX(RedHat)
LINUX FAQ
Linux Documentation
Project
Red Hat support
1-888-REDHAT1
Linux Software Map
RHCE




                                   12페이지

								
To top