Wednesday, August 2, 2017

▷ System Commands (시스템 명령어)

[ System Commands ]


Directory
AIX
HP-UX
LINUX
SOLARIS
Root filesystem  /{/dev/hd4}  /{/dev/vg00/lvol1}  /{/dev/sda1}  /{/dev/vx/dsk/rootvol} 
Home Directory  /home{/dev/hd1}  /home{/dev/vg00/lvol4}    /export/home
 /dev/vx/dsk/home} 
  /tmp {/dev/hd3}  /tmp {/dev/vg00/lvol6}    /tmp {/dev/vx/dsk/swapvol}
  /usr{/dev/hd2}  /usr {/dev/vg00/lvol7}    /usr
  /var{/dev/hd9var}  /var {/dev/vg00/lvol8}    /var 
User Accounts
AIX
HP-UX
LINUX
SOLARIS
Password files  /etc/passwd /etc/passwd /etc/passwd /etc/passwd 
/etc/security/passwd  /tcb/files/auth/r/root  /etc/shadow  /etc/shadow 
Groups file  /etc/group /etc/group /etc/group  /etc/group 
/etc/security/group  /etc/logingroup 
Maximum # of user ID  4294967295 2147483647 65535 2147483647
Allow/Deny remote login  /etc/security/user /etc/securetty /etc/securetty /etc/default/login
{rlogin=true}  {console}  {ttyp1}  {CONSOLE=/dev/console} 
User nobody's id #  4294967294 -2 99 60001 & 65534(nobody4) 
Group nobody's id #  4294967294 -2(nogroup)  99  60002 & 65534(nogroup) 
Recover root password  boot from CD/Tape ISL>hpux -is linux S boot cdrom -s
Installation/Maintenance vi /tcb/files/auth/r/root vi /etc/shadow  mount /dev/c0t0d0s0 /mnt
Start Limited Shell vi /etc/shadow    vi /mnt/etc/shadow 
getrootfs hdisk0      
vi /etc/security/passwd       
Create new user  mkuser  useradd  useradd  useradd 
Delete user  rmuser  userdel  userdel  userdel 
List users  lsuser -f ALL  logins    logins 
Modify user account  chuser -a  usermod  usermod  usermod 
General Commands
AIX
HP-UX
LINUX
SOLARIS
Unique host ID  hostid  uname -i  hostid  hostid 
Administrator  smit  sam  linuxconf  admintool 
Performance monitor  top top top  top 
monitor  glance 
System activity reporter  sar  sar    sar 
Virtual Memory statistics  vmstat  vmstat  vmstat  vmstat 
I/O statistics  iostat  iostat    iostat 
Error logs  alog -o -t boot dmesg  dmesg dmesg 
errpt 
Physical RAM  1M TB 4TB  64 GB {>2.3.24}  16TB 
Shared Memory  64K TB 8TB  sysctl kernel.shmmax   
Process Data Space  384K TB 4TB  900 MB  
Swap device  /dev/hd6  /dev/vg00/lvol2  /dev/sda2  /dev/vx/dsk/swapvol 
Swap file type  /etc/swapspaces  swap  partition type 82 swap 
Display swap size  lsps -a  swapinfo -a  free  swap -l 
Activate Swap  swapon -a  swapon -a  swapon -a  swap -a 
TCP/IP
AIX
HP-UX
LINUX
SOLARIS
Network IP configuration  lsattr -E -l inet0  /etc/rc.config.d/netconf  /etc/sysconfig/network-scripts/ /etc/hostname.*
/etc/inet/*
/etc/defaultrouter 
Hosts IP addresses  /etc/hosts  /etc/hosts  /etc/hosts  /etc/inet/hosts 
Name service switch  /etc/netsvc.conf  /etc/nsswitch.conf  /etc/nsswitch.conf  /etc/nsswitch.conf 
Network parameters  no -a  ndd -h  sysctl -a | grep net  ndd /dev/[tcp|ip] ? 
Routing daemon  gated  gated  routed  in.routed 
NIC Configurations  ifconfig -a  lanscan -v  ifconfig -a  ifconfig -a 
Secondary IP Address  ifconfig en0 alias IP ifconfig lan0:1 IP modprobe ip_alias ifconfig hme0:1 IP up 
ifconfig eth0:1 IP 
Login prompt  HERALD @ telnetd -b /etc/issue /etc/issue  BANNER @
/etc/security/login.cfg /etc/default/telnetd 
Remote Shell  remsh, rsh remsh  rsh  rsh 
System Files
AIX
HP-UX
LINUX
SOLARIS
NFS exported  /etc/exports  /etc/exports  /etc/exports  /etc/dfs/dfstab
/etc/dfs/sharetab 
NFS Client mounted directories  /etc/xtab  /etc/xtab  /var/lib/nfs/xtab  /etc/rmtab 
DISK/LVM Commands
AIX
HP-UX
LINUX
SOLARIS
Filesystem table  /etc/filesystems  /etc/fstab  /etc/fstab  /etc/vfstab 
Free disk blocks  df -k  bdf  df -k  df -k 
Device listing  lsdev -C  /sbin/ioscan  cat /proc/devices  sysdef 
Disk information  bootinfo -s hdisk# diskinfo /dev/rdsk/c#t#d#  cat /proc/scsi/scsi0/sda/model  format -d c#t#d#
Disk Label  lspv -l hdisk#  pvdisplay -v /dev/dsk/C#t#d#  fdisk -l  prtvtoc 
LVM Concepts  Partition logical extents  logical extents  sub disk 
  Volume  logical volume  logical volume  Volume 
        Plex 
  Volume group  volume group  volume group  disk group 
Journal Filesystem type  jfs  vxfs  ext  vxfs 
Default volume group  /dev/rootvg  /dev/vg00    /dev/vx/dsk/rootdg 
Display volume group  lsvg -l rootvg  vgdisplay -v vg00  vgdisplay -v  vxprint -l -g rootdg 
Modify physical volume  chpv  pvchange  pvchange   
Prepare physical disk  mkdev -c disk -l hdisk#  pvcreate  pvcreate  vxdiskadd 
List physical volume  lspv  pvdisplay  pvdisplay  vxprint -dl 
Remove disk from volume group  reducevg  vgreduce  vgreduce  vxdg rmdisk 
Move logical volumes to another physical volumes  migratepv  pvmove  pvmove  vxassist move 
Create volume group  mkvg  vgcreate  vgcreate  vxdg init 
Remove volume group    vgremove  vgremove   
Volume group availability chvg, varyonvg, varyoffvg vgchange  vgchange   
Restore volume group    vgcfgrestore  vgcfgrestore   
Exports volume group  exportvg  vgexport  vgexport  vxdg deport 
Imports volume group  importvg  vgimport  vgimport  vxdg import 
Volume group listing  lsvg  vgscan  vgscan   
Change logical volume characteristics chlv  lvchange  lvchange vxedit set 
List logical volume  lslv  lvdisplay  lvdisplay  vxprint -vl 
Make logical volume  mklv  lvcreate  lvcreate  vxassist make 
Extend logical volume  extendlv  lvextend  lvextend  vxassist growto 
Reduce logical volume  AIX reduce LV  lvreduce  lvreduce  vxassist shrinkto 
Remove logical volume  rmlv  lvremove  lvremove  vxedit rm 
Prepare boot volumes  bootlist -m normal  lvlnboot  lilo  vxbootsetup 
Remove boot volumes    lvrmboot     
Extend File system  chfs -a size=#  extendfs -F vxfs -s # resize2fs  vxva
fsadm -F vxfs -b {LE * 1024}  mkfs -M 
Reduce/Split mirrors  rmlvcopy  lvsplit  lvsplit   
Merge mirrors    lvmerge  lvmerge   
Create mirrors  mklv -c 2  lvcreate -m 1    vxassist mirror 
Add mirrors  mklvcopy lv 2 lvextend -m 1     
Create striped volumes  mklv -u 3 -S 64K  lvcreate -i 3 -I 64  lvcreate -i 3 -I 64  vxassist make vol 100mb layout=raid5 
MISC
AIX
HP-UX
LINUX
SOLARIS
Startup script  /etc/rc  /sbin/rc  /etc/rc.d/rc  /sbin/init.d 
Kernel  /usr/lib/boot/unix_up  /stand/vmunix  /boot/vmlinuz  /kernel/genunix 
Kernel Parameters  lsattr -E -l sys0  kmtune sysctl -a  sysdef- i 
kmsystem 
List modules  genkex kmadmin -s  lsmod  modinfo 
kcmodule –s for IA
Load module    kmadmin -L  insmod  modload 
Unload module    kmadmin -U  rmmod  modunload 
Initialize system  install_assist  set_parms initial  netconf  sys-unconfig 
Physical RAM  bootinfo -r  grep -i Physical /var/adm/syslog/syslog.log  free  prtconf 
Kernel Bits  getconf WORD_BIT  getconf KERNEL_BITS  getconf WORD_BIT  isainfo -kv 
Crash utility  crash  crashutil    crash 
Machine model  uname -m model uname -m  uname -imp 
bootinfo -m  uname -m 
OS Level  oslevel  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` 
Maintenance mode    ISL>hpux -lm    ok boot -as 
Interrupt Key    control-B    Stop-A 
Return to console    co    ok go 
Software
AIX
HP-UX
LINUX
SOLARIS
Install Software  installp -a  swinstall  rpm -i package  pkgadd 
Uninstall software  installp -u  swremove  rpm -e package  pkgrm 
List installed software  lslpp -L all  swlist  rpm -qa  pkginfo 
Verify installed software  lppchk -v  swlist -l fileset -a state  rpm -V package  pkginfo -i
pkginfo -p 
List all files  lslpp -f fileset  swlist -l file fileset  rpm -ql package  pkgchk -l package 
List installed patches  instfix -i  swlist -l patch   patchadd -p 
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/adm/sw/  /var/lib/rpm  /var/sadm 
Devices
AIX
HP-UX
LINUX
SOLARIS
Devices  /dev  /dev  /dev  /devices 
Device drivers  lscfg  lsdev    prtconf -D 
CPU  lsdev -Cc processor  ioscan -fnC processor    psrinfo -v 
List Terminal  lsdev -Cc tty  ioscan -fnC tty    pmadm -l 

No comments:

Post a Comment

◈ Recent Post

▷ UITest demo with TestOne (Mobile, Keypad and Drag until found tip)

[ UITest Demo Environment ] 1. UITest Solution: TestOne 2. Description 데모 설명    How to use keypad, and to drag until found.     키패드를...

◈ Popular Posts