UNIX Command Compilations

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

User Administrations Solaris HP-UX AIX

Password files /etc/passwd


/etc/shadow
/etc/passwd
/tcb/files/auth/r/root
/etc/passwd
/etc/security/passwd
Groups file /etc/group /etc/group
/etc/logingroup
/etc/group
/etc/security/group
Maximum # of user ID 21!"#$! 21!"#$! 2%%$!2%&
'llow/Deny remote login /etc/default/login
()*+,*-.//de0/console1
/etc/securetty
(console1
/etc/security/user
(rlogin/true1
2ser nobody3s id # $4441 5 $&&#6nobody7 82 2%%$!2%
Group nobody3s id # $4442 5 $&&#6nogroup7 826nogroup7 2%%$!2%
9eco0er root password boot cdrom 8s
m:dir /tmp/a
mount /de0/c4t4d4s4
/tmp/a
0i /tmp/a/etc/shadow
;boot
Interact with IP- < Y
I,-;hpux 8i,
passwd root
boot from )D/=ape
Installation/Maintenance
,tart -imited ,hell
getrootfs hdis:4
0i /etc/security/passwd
)reate new user useradd useradd m:user
Delete user userdel userdel rmuser
-ist users logins logins lsuser 8f '--
Modify user account usermod usermod chuser 8a
General )ommands ,olaris >P82? 'I?
2ni@ue host ID hostid uname 8i hostid
'dministrator admintool sam smit / smitty
Performance monitor top top
glance
top
monitor
,ystem acti0ity reporter sar sar sar
Airtual Memory statistics 0mstat 0mstat 0mstat
I/* statistics iostat iostat iostat
.rror logs dmesg dmesg alog 8o 8t boot
errpt
,wap de0ice /de0/ds:/c4t4d4s1 6eBg7 /de0/0g44/l0ol2
,wap file type swap swap /etc/swapspaces
Display swap siCe swap 8l swapinfo 8a lsps 8a
'cti0ate ,wap swap 8a swapon 8a swapon 8a
Printers Solaris HP-UX AIX
Printer Dueues /etc/lp/interfaces/E /etc/lp/interface/E /etc/@config
,top -P /usr/lib/lp/lpshut lpshut stopsrc 8s lpd
,tart -P /usr/lib/lp/lpsched lpsched startsrc 8s lpd
,ubmit print Fobs lp
lpr
lp en@
lp
lpr
@prt
-P statistics lpstat lpstat en@ 8'
lp@
lpstat
@ch:
9emo0e print Fobs cancel
lprm
cancel cancel
lprm
@can
en@ 8x
'dd printer @ueue lpadmin 8p p@ lpadmin 8p p@ smit m:p@
9emo0e Printer @ueue lpadmin 8x p@ lpadmin 8x p@ smit rmp@
Ma:e default printer lpadmin 8d p@ lpadmin 8d p@ export -PD.,=/Gp@G
Networking TCP/IP Solaris HP-UX AIX
+etwor: IP configuration /etc/hostnameBE
/etc/inet/E
/etc/defaultrouter
/etc/rcBconfigBd/netconf lsattr 8. 8l inet4
>osts IP addresses /etc/inet/hosts /etc/hosts /etc/hosts
+ame ser0ice switch /etc/nsswitchBconf /etc/nsswitchBconf /etc/nets0cBconf
+etwor: parameters ndd /de0/HtcpIipJ < ndd 8h no 8a
9outing daemon inBrouted gated gated
+I) )onfigurations ifconfig 8a lanscan 80 ifconfig 8a
,econdary IP 'ddress ifconfig hme4K1 IP up ifconfig lan4K1 IP ifconfig en4 alias IP
-ogin prompt L'++.9 M
/etc/default/telnetd
telnetd 8b /etc/issue >.9'-D M
/etc/security/loginBcfg
Increase the # of pseudo8
terminals
(/etc/system1
set ptNcnt / # (,O,A1
set npty / # (L,D1
(/etc/iuBap1
rebuild your :ernel with
these new 0alues +P=O/#
+,=9PO/#
odmget 8@ Gattribute/num and
uni@uetype/pty/pty/ptyG Pd't
I sed Gs/48$/48&12/G I
odmchange 8@ Gattribute/num
and uni@uetype/pty/pty/ptyG
ptsl 4 # ldterm ttcompat
halt
boot 8r
reboot
insf 8d ptys 8n #
insf 8d ptym 8n #
insf 8d pts 8s # 8e 80

8o Pd't
chde0 8l pty4 8anum/2&$ 8P
reboot
9emote ,hell rsh remsh remsh
rsh
OP/+I, ser0ice binder /usr/lib/nets0c/yp/ypbind /usr/lib/nets0c/yp/ypbind /usr/lib/nets0c/yp/ypbind
System Files Solaris HP-UX AIX
+P, exported /etc/dfs/dfstab
/etc/dfs/sharetab
/etc/exports /etc/exports
+P, )lient mounted
directories
/etc/rmtab /etc/xtab /etc/xtab
DISK/!" Commands S#A$IS
HP-UX
AIX
Pilesystem table /etc/0fstab /etc/fstab /etc/filesystems
Pree dis: bloc:s df 8: bdf df 8:
De0ice listing sysdef /sbin/ioscan lsde0 8)
'0ailable Dis:s echoIformat /sbin/ioscan 8fn)dis:
Dis: information format 8d c#t#d#
format;current
format;in@uiry
dis:info /de0/rds:/c#t#d# bootinfo 8s hdis:#
Dis: -abel prt0toc p0display 80
/de0/ds:/)#t#d#
lsp0 8l hdis:#
-AM )oncepts sub dis: 6with AxAM7 logical extents Partition
Aolume logical 0olume Aolume
Plex
dis: group 0olume group Aolume group
Qournal Pilesystem type 0xfs 0xfs Ffs
Default 0olume group /de0/0x/ds:/rootdg /de0/0g44 /de0/root0g
Display 0olume group 0xprint 8l 8g rootdg 0gdisplay 80 0g44 ls0g 8l root0g
Modify physical 0olume p0change chp0
Prepare physical dis: 0xdis:add p0create m:de0 8c dis: 8l hdis:#
-ist physical 0olume 0xprint 8dl p0display lsp0
9emo0e dis: from 0olume
group
0xdg rmdis: 0greduce reduce0g
Mo0e logical 0olumes to
another physical 0olumes
0xassist mo0e p0mo0e migratep0
)reate 0olume group 0xdg init 0gcreate m:0g
9emo0e 0olume group 0gremo0e
Aolume group a0ailability 0gchange ch0g
0aryon0g
0aryoff0g
9estore 0olume group 0gcfgrestore
.xports 0olume group 0xdg deport 0gexport export0g
Imports 0olume group 0xdg import 0gimport import0g
Aolume group listing 0gscan ls0g
)hange logical 0olume
characteristics
0xedit set l0change chl0
-ist logical 0olume 0xprint 80l l0display lsl0
Ma:e logical 0olume 0xassist ma:e l0create m:l0
.xtend logical 0olume 0xassist growto l0extend extendl0
9educe logical 0olume 0xassist shrin:to l0reduce AIX reduce LV
9emo0e logical 0olume 0xedit rm l0remo0e rml0
Prepare boot 0olumes 0xbootsetup l0lnboot bootlist 8m normal
9emo0e boot 0olumes l0rmboot
.xtend Pile system 0x0a
m:fs 8M
extendfs /de0/0g44/l0ol"
fsadm 8P 0xfs 8b
(-. E 1421 /mt
chfs 8a siCe/# /mt
9educe/,plit mirrors l0split rml0copy
Merge mirrors l0merge
)reate mirrors 0xassist mirror l0create 8m 1 m:l0 8c 2
'dd mirrors l0extend 8m 1 m:l0copy l0 2
)reate striped 0olumes 0xassist ma:e 0ol 144mb
layout/raid&
l0create 8i # 8I $ m:l0 8u # 8, $R
,ystem reco0ery tape /
opt/ignite/bin/ma:eNreco0e
ry
m:sysb 8i /de0/rmt4
Lac:up ufsdump fbac:up sa0e0g 8i root0g
9estore ufsrestore freco0er rest0g
"ISC S#A$IS HP-UX AIX
,tartup scripts /etc/initBd/ /sbin/rcBd/ /etc/rc
Rernel /:ernel/genunix /stand/0munix /usr/lib/boot/unixNup
Rernel Parameters sysdef 8i sysdef
:mtune
:msystem
lsattr 8. 8l sys4
9econfigure the :ernel 0i /etc/system
reboot
cd /stand/build
/usr/lbin/sysadm/systemNpr
ep 80 8s system
0i system
m:N:ernel 8s system
cd /stand
m0 system systemBpre0
m0 0munix 0munixBpre0
m0 dl:m dl:mBpre0
m0 /stand/build/system
system
:mupdate
/stand/build/0munixNtest
chde0 8l sys4 8a
-ist modules modinfo :madmin 8s gen:ex
-oad module modload :madmin 8-
2nload module modunload :madmin 82
InitialiCe system sys8unconfig setNparms initial installNassist
Physical 9'M prtconf grep 8i Physical
/0ar/adm/syslog/syslogBlog
bootinfo 8r
Rernel Lits isainfo 8:0 getconf R.9+.-NLI=, bootinfo 8R
)rash utility crash adb crash
=race ,ystem )alls truss tusc syscalls
Machine model uname 8imp model
uname 8m
uname 8m
bootinfo 8m
*, -e0el uname 8r uname 8r osle0el
9un -e0el who 8r who 8r who 8r
)ore dump files /0ar/crash/Suname 8nS /0ar/adm/crash /0ar/adm/ras
Loot single user o: boot 8s ;boot
Interact with IP- < Y
I,-;hpux 8i,
Rey on ser0ice mode/P
Loot from )D/=ape
,elect Maintenance
-imited function ,hell
Maintenance mode o: boot 8as ;boot
Interact with IP- < Y

I,-;hpux 8lm
Interrupt Rey ,top8' control8L
9eturn to console o: go co
=imeCone Management /etc/=IM.T*+.
/etc/default/init
/etc/=IM.T*+. /etc/en0ironment
/etc/profile
+=P Daemon /etc/inet/ntpBconf
/etc/initBd/xntpd
/
etc/rcBconfigBd/netdaemons
/sbin/initBd/xntpd
/etc/ntpBconf
startsrc 8s xntpd
So%tware S#A$IS HP-UX AIX
Install ,oftware p:gadd swinstall installp 8a
2ninstall software p:grm swremo0e installp 8u
-ist installed software p:ginfo swlist lslpp 8- all
Aerify installed software p:ginfo 8i
p:ginfo 8p
swlist 8l fileset 8a state lppch: 80
-ist all files p:gch: 8l pac:age swlist 8l file fileset lslpp 8f fileset
-ist installed patches patchadd 8p swlist 8l patch
what /stand/0munix
instfix 8i
Pac:age owner p:gch: 8l 8p path swlist 8l file I grep path lslpp 8w path
,U Directory /0ar/sadm /0ar/adm/sw/ /usr/lpp
De&i'es S#A$IS HP-UX AIX
De0ices /de0ices /de0 /de0
Install de0ices for
attached peripherals
dr0config
de0lin:s
dis:s
tapes
ports
insf 8e cfgmgr 80
9emo0e de0ice remNdr0 rmsf rmde0 8l
De0ice dri0ers prtconf 8D lsde0 lscfg
)P2 psrinfo 80 ioscan 8fn) processor lsde0 8)c processor
-ist =erminal pmadm 8l ioscan 8fn) tty lsde0 8)c tty
Diagnostics /usr/platform/Suname 8mS/
sbin/prtdiag
o: test8all
/opt/,2+U0ts/bin/sun0ts
stm diag
Uhole Dis: /de0/c#t#d4s2 /de0/ds:/c#t#d4 /de0/hdis:#
)D9*M /de0/ds:/c#t$d4s2 /de0/ds:/c#t2d4 /de0/cd4
)D9*M file type hsfs cdfs cdrfs
9ewinding tape dri0e /de0/rmt/4 /de0/rmt/4m /de0/rmt4
+on8rewinding tape dri0e /de0/rmt/4n /de0/rmt/4mn /de0/rmt4B1
Ploppy dri0e /de0/dis:ette 8 /de0/rfd4
Tools Solaris HP-UX AIX
=ool +ame
>ow to execute
*utput file location
,2+Uexplo
/opt/,2+Uexplo/bin/explorer
/opt/,2+Uexplo/output/E
nic:el
sh /opt/contrib/bin/nic:el
/tmp/nic:elBVhostname
/
opt/contrib/bin/nic:el/EBt
arBgC

You might also like