Sei sulla pagina 1di 14

AIX Command Crib Sheet ---------------------------------------------------------------------------MISCELLENEOUS ---------------------------------------------------------------------------oslevel whence (program whereis (program what (program Returns operating system

level Returns !ull path o! program Returms !ull path o! program "isplays i#enti!ying in!o !rom the e$ecuta%le li&e version num%er' when compile#(

lslpp -L all list all installe# so!tware lslpp -L (program set name Chec& i! so!tware installe# lslpp -! Lists !ilesets vs pac&ages lslpp -ha Lists installation history o! !ilesets inst!i$ -i& (!i$ num%er eg I)***+, inst!i$ -i& -../-/012I)1ML compress -c !ile(t$t 3 !ile(4 Chec&s i# !i$ is installe# Create a compresse# !ile(

uuenco#e (in!ile (e$tract-!ile-name 3 (output !ile Converts a %inary !ile to an 2SCII !ile !or trans!er %y mo#em or email uu#eco#e (enco#e# !ile E$tracts a %inary !ile !rom enco#e# !ile an# calls it the e$tract-!ile-name e$amples 5uuenco#e maymap maymap 3 maymap(enc uuenco#e maymap(enc o# -c 6tmp ls -i echo 7 alog -o -t %oot "isplays contents o! the 6tmp #irectory !ile Lists !iles with their ino#e num%ers Lists !iles' can %e use# i! ls is corrupt6missing 8iew the %oot log Changes the time9one in 6etc6environment !ile Changes the language in 6etc6environment !ile

cht9 (time9one eg :M;/<S; chlang (language eg En1:< ar -v -t (archive !ile ar -v -$ (archive !ile ar -v -t 6usr6li%6li%C-r(a

List contents o! an archive E$tracts the archive Lists contents o! the li%C1r(a li%rary

!in# 6source -print = cpio -p#m 6target Copying #irectories using cpio' creates 6target6source #irectory( #ump -n;v (%inary e$ecuta%le #ump -c #ump -o #ump -l #ump -s "isplays the contents o! an e$ecuta%le !ile "isplays string in!ormation "isplays o%>ect !ile hea#ers "isplays line num%ers "isplays the te$t section

snap -ao 6#ev6rmt/ Create a snapshot onto tape snap -a# (#irectory Create a snapshot into a name# #irectory other than the #e!ault (6tmp6i%msupt 6usr6#t6%in6#tcon!ig -# "isa%les #es&top logins 6usr6#t6%in6#tcon!ig -e Ena%les #es&top logins 6var6#t6)pi# ?I" o! the #tlogin process

-------------------------------------------------------------------------------;ERMIN2LS -------------------------------------------------------------------------------tty term#e! "isplays what the tty6pty num%er o! the terminal is( reports the termtype setup in smit !or the tty port that term#e! is run on( Sets tty to a vt+// terminal type a##s getty line into 6etc6initta% !or tty/ an# starts getty #isa%les the getty line an# #isa%les getty Set %ac&space &ey !or vt+// terminals Set %ac&space &ey !or wyseD/ terminals

ch#ev -l (#evice eg tty+ -a term@vt+// pena%le tty/ p#isa%le tty/ stty erase AB stty erase AC

pena%le 6 p#isa%le -a option is !or all

lscons "isplays the console #evice chcons -a login@ena%le (#evice eg 6#ev6tty+ Changes the console #evice Create ttys on ports / to , on a#apter sa0 5!or i in / + 0 . - D * , #o m&#ev -c tty+ -t tty -s rs0.0 -p sa0 -wEi -a login@ena%le -a term@vt+// #one portmir -t 6#ev6tty/ Mirror current terminal onto 6#ev6tty/ portmir -o ;urns o!! port mirroring -------------------------------------------------------------------------------NE;FORG -------------------------------------------------------------------------------host (ip or hostname Resolves a hostname 6 ip a##ress hostname "isplays hostname hostname (hostname Sets the hostname until ne$t re%oot ch#ev -l (#evice name -a hostname@(hostname ch#ev -l inet/ -a hostname@thomas Changes hostname permanently

i!con!ig (#evice name "isplays networ& car# settings i!con!ig (#evice name up ;urns on networ& car# i!con!ig (#evice name #own ;urns o!! networ& car# i!con!ig (#evice name #etach Removes the networ& car# !rom the networ& inter!ace list i!con!ig en/ inet +H-(.D(D0(+ netmas& 0DD(0DD(0DD(/ up i!con!ig lo/ alias +HD(*/(*/(+ Create alias ip a##ress !or loop%ac& route (a##6#elete (-net6-host (#estination (gateway 2##s or #eletes routes to other networ&s or hosts' #oes not up#ate the O"M #ata%ase an# will %e lost at re%oot( route a## -net +H-(*/(IH(/ +H-(*/(H/(lsattr -ECl inet/ "isplays routes set in O"M an# hostname o#mget -J Kname@inet/K Cu2t "isplays routes set in O"M an# hostname re!resh -s inet# &ill -+ (inet# ?I" Re!resh inet# a!ter changes to inet#(con! Re!resh inet# a!ter changes to inte#(con!

netstat -i "isplays inter!ace statistics entstat -# (ethernet a#apter eg en/ "isplays ethernet statistics

arp -a no -a

"isplays ip to mac a##ress ta%le !rom arp cache "isplays networ& options use -o to set in#ivi#ual options or -# to set in#ivi#ual options to #e!ault( no -o option@value (this value is reset at re%oot no -o Kip!orwar#ing@+K

traceroute (name or ipa##ress "isplays all the hops !rom source to #estination supplie#( ping -R (name or ipa##ress Same as traceroute e$cept repeats( -------------------------------------------------------------------------------N(L(S( -------------------------------------------------------------------------------e$port!s e$port!s -a e$port!s -u (!ilesystem m&n!s rmn!s m&n!se$p -# 6#irectory m&n!smnt Lists all e$porte# !ilesystems E$ports all !sMs in 6etc6e$ports !ile Un-e$ports a !ilesystem Con!igures an# starts NLS services Stops an# un-con!igures NLS services Creates an NLS e$port #irectory Creates an NLS mount #irectory Mount an NLS !ilesystem

mount hostname56!ilesystem 6mount-point

n!so -a "isplay NLS Options n!so -o option@value Set an NLS Option n!so -o n!s1use1reserve#1port@+ -------------------------------------------------------------------------------<2CGU?S -------------------------------------------------------------------------------MGSNS< -----m&s9!ile -! m&s9!ile -) C?IO 2RCCI8E -----------!in# (!ilesystem -print = cpio -ocv 3 (!ilename or #evice eg !in# (6usr6 -print = cpio -ocv 3 6#ev6rmt/ C?IO RES;ORE -----------cpio -ict O (!ilename or #evice = more Lists archive cpio -ic#v O (!ilename or #evice cpio -ic#v O (!ilename or #evice (K!iles or #irectories to restoreK eg cpio -ic#v O 6#ev6rmt/ Ktcpip67K cpio -ic#v O 6#ev6rmt/ K7resolve(con!K ;2R 2RCCI8E ----------tar -cv! (!ilename or #evice (K!iles or #irectories to archiveK eg tar -cv! 6#ev6rmt/ K6usr67K Restore #irectory an# contents Restore a name# !ile Creates 6image(#ata !ile (-($ onwar#s Creates 6!s(si9e !ile (.($

m&sys% (#evice eg 6#ev6rmt/

;2R RES;ORE ----------tar -tv! (!ilename or #evice Lists archive tar -$v! (!ilename or #evice Restore all tar -$v! (!ilename or #evice (K!iles or #irectories to restoreK use -p option !or restoring with orginal permissions eg tar -$v! 6#ev6rmt/ KtcpipK Restore #irectory an# contents tar -$v! 6#ev6rmt/ Ktcpip6resolve(con!K Restore a name# !ile 2I) 2RCCI8E ----------!in# (!ilesystem -print = %ac&up -iJv! (!ilename or #evice <ac&up %y !ilename( eg !in# 6usr6 -print = %ac&up -iJv! 6#ev6rmt/ %ac&up -(%ac&up level / to H -! (!ilename or #evice (K!ilesystemK <ac&up %y ino#e( eg %ac&up -/ -! 6#ev6rmt/ K6usrK 2I) RES;ORE ----------restore -J;v! (!ilename or #evice Lists archive restore -Jv$! (!ilename or #evice Restores all restore -Jv$! (!ilename or #evice (K!iles or #irectories to restoreK (use -# !or restore #irectories restore -Jv$! 6#ev6rmt/(+ K(6etc6passw#K restore -s- -J;v! 6#ev6rmt/(+ <2CGU?S 2CROSS 2 NE;FORG -----------------------;o run the %ac&up on a local machine (cpio an# %ac&up on the remote machineMs (remhost tape #rive (6#ev6rmt/ !in# 6#ata -print = cpio -ocv = ## o%s@.0& = rsh remhost P K## i%s@.0& o%s@*-& o!@6#ev6rmt/K ;o restore6rea# the %ac&up (cpio on the remote machine ## i%s@*-& i!@6#ev6rmt/ = cpio -icvt ;o restore6rea# the %ac&up (cpio on the local machine !rom the remote machineMs (remhost tape #rive (6#ev6rmt/ rsh remhost K## i%s@*-& o%s@.0& i!@6#ev6rmt/K = ## i%s@.0& P = cpio -icvt ;o run the %ac&up (cpio on a remote machine (remhost an# %ac&up to the local machines tape #rive (6#ev6rmt/ rsh remhost K!in# 6#ata -print = cpio -icv = ## i%s@.0&K P = ## i%s@.0& o%s@*-& o!@6#ev6rmt/ -------------------------------------------------------------------------------Copying #is&ettes an# tape -------------------------------------------------------------------------------Restore 6etc6passw# !ile Lists contents o! a m&sys% tape -u option up#ates 6etc6#ump#ates !ile

CO?NIN: "ISGE;;ES ----------------## i!@6#ev6!#/ o!@(!ilename %s@.*% ## i!@(!ilename o!@6#ev6!#/ %s@.*% conv@sync CO?NIN: ;2?ES ------------## i!@6#ev6rmt/ o!@(!ilename ## i!@(!ilename o!@6#ev6rmt/ or tcopy or !lcopy

-------------------------------------------------------------------------------8I Comman#s -------------------------------------------------------------------------------5g6$$$6s66yyy6 glo%al change where $$$ is to %e change# %y yyy se# Ms(ctrl v ctrl m g66gM ol#(!ilename 3 new(!ilename Strips out AM characters !rom ascii !iles that have %een trans!erre# as %inary( ;o enter crontrol characters type ctrl v then ctrl B where B is whatever ctrl character you nee#( -------------------------------------------------------------------------------"E8ICES -------------------------------------------------------------------------------lsc!g lists all installe# #evices lsc!g -v lists all installe# #evices in #etail lsc!g -vl (#evice name lists #evice #etails %ootin!o -% %ootin!o -& reports last #evice the system %oote# !rom reports &eyswitch position +@secure' 0@service' .@normal

%ootin!o -r reports amount o! memory (6 %y +/0%ootin!o -s (#is& #evice reports si9e o! #is& #rive %ootin!o -; reports type o! machine ie rspc lsattr -El sys/ -a realmem reports amount o! usea%le memory Creates a 6#ev6 #evice !ile( m&no# (#evice c (ma>or no (minor no m&no# 6#ev6null+ c 0 .

ls#ev -C lists all customise# #evices ie installe# ls#ev -? lists all pre-#e!ine# #evices ie supporte# ls#ev -(C or ? -c (class -t (type -s (su%type ch#ev -l (#evice -a (attri%ute @(new value ch#ev -l sys/ -a ma$uproc@I/ Change a #evice attri%ute

lsattr -EC -l (#evice -" Lists the #e!aults in the pre-#e!ine# #% lsattr -EC -l sys/ -a mo#elname rm#ev -l (#evice rm#ev -l (#evice -# rm#ev -l (#evice -SR Change #evice state !rom availa%le to #e!ine# "elete the #evice S stops #evice' R uncon!igures chil# #evices

lsresource -l (#evice "isplays %us resource attri%utes o! a #evice( ?ower Management (?CI machines ls ------------------------------pmctrl -a "isplays the ?ower Management state

rm#ev -l pmc/ m&#ev -l pmc/

Uncon!igure ?ower Management Con!igure ?ower Management

-------------------------------------------------------------------------------;2?E "RI8ES -------------------------------------------------------------------------------rmt/($ where $ @ 2 Q < Q C 2 @ #ensity < @ retension C @ rewin# / @ high / @ no / @ no !s! (No %s! (No rewin# o!!line status - @ low 0 @ yes + @ yes S&ips !orwar# (No tape mar&ers S&ips %ac& (No tape mar&ers Rewin# the tape E>ect the tape Show status o! tape #rive

tctl -! (tape #evice tctl -! (tape #evice tctl -! (tape #evice tctl -! (tape #evice tctl -! (tape #evice

ch#ev -l rmt/ -a %loc&1si9e@D+0 changes %loc& si9e to D+0 %ytes (-mm @ +/0-' Imm @ varia%le %ut +/0- recommen#e# %ootin!o -e answer o! + @ machine can %oot !rom a tape #rive answer o! / @ machine C2NNO; %oot !rom tape #rive Car#ware reset a tape #rive( Chec&s Num%er o! !iles on tape( Rewin#s the tape RRR

#iag -c -# (tape #evice tapech& (No o! !iles O 6#ev6rmt/

-------------------------------------------------------------------------------?RIN;ERS 6 ?RIN; SUEUES -------------------------------------------------------------------------------splp (#evice splp 6#ev6lp/ lsvirprt "isplays6changes printer #river settings Set #e!ault printer Jueue !or login session Removes a virtual printer

e$port EL?"ES;@KpJnameK

Lists6changes virtual printer attri%utes( Change a Jueue >o% priority(

rmvirprt -J Jueuename -# Jueue#evice Jpri -T(>o% No -a(new priority Jhl# -T(>o% No Jhl# -r T(>o% No Jch& -2 lpstat lpstat -p(Jueue Jcan -$ (>o% No cancel (>o% No enJ -U -?(Jueue ena%le (Jueue enJ -" -?(Jueue #isa%le (Jueue startsrc -s J#aemon lssrc -s J#aemon stop -s J#aemon ?ut a hol# on hol# Release a hel# >o%

Status o! >o%s in Jueues Status o! >o%s in a name# Jueue Cancel a >o% !rom a Jueue Ena%le a Jueue "isa%le a Jueue

Jmov -m(new Jueue -T(>o% No Move a >o% to another Jueue Start J#aemon su%-system List status o! J#aemon su%-system Stop J#aemon su%-system

-------------------------------------------------------------------------------LILE SNS;EMS -------------------------------------------------------------------------------?hysical 8olumes (?8Ms ----------------------lspv lspv (pv lspv -l (pv lspv -p (pv chpv -v r (pv chpv -v a (pv chpv -a y (pv chpv -a n (pv Lists all physical volumes (har# #is&s Lists the physical volume #etails Lists the logical volumes on the physical volume Lists the physical partition usage !or that ?8 Ma&es a new h#is& a pysical volume( Removes a #is& !rom the system( 2##s the remove# #is& %ac& into the system( Changes pv allocata%le state to NES Changes pv allocata%le state to NO

ch#ev -l (pv -a pv@yes

migratepv (ol# pv (new pv Moves all L8Ms !rom one ?8 to another ?8' %oth ?8Ms must %e in the same volume group( 8olume :roups (8:Ms -------------------lsvg lsvg (vg lsvg -l (vg lsvg -p (vg lsvg -o Lists all volume groups Lists the volume group #etails Lists all logical volumes in the volume group Lists all physical volumes in the volume group Lists all varie# on volume groups

varyonvg (vg 8ary On a volume group varyonvg -! (vg Lorces the varyon process varyonvg -s (vg 8ary on a 8: in maintenance mo#e( L8 comman#s can %e use# on 8:' %ut L8's cannot %e opene# !or I6O( varyo!!vg (vg 8ary O!! a volume group synclvo#m (vg ;ries to resync 8:"2' L8 control %loc&s an# O"M( Create a volume group m&vg -y(vg -s(?? si9e (pv m&vg -y #atavg -s - h#is&+

re#ucevg -# (vg (pv Removes a volume group re#ucevg (vg (?8I" Removes the ?8I" #is& re!erence !rom the 8:"2 when a #is& has vanishe# without the re#ucevg (vg (pv comman# %eing run !irst( e$ten#vg (vg (new pv e$portvg (vg 2##s another ?8 into a 8:( E$ports the volume group eg #eletes itR

Note 5 Cannot e$port a 8: i! it has active paging space' turn o!! paging' re%oot %e!ore e$porting 8:( E$porting removes entries !rom !ilesystems !ile %ut #oes not remove the mount points( chvg -a y (vg lJueryvg -2tp (pv 2uto 8ary On a volume group at system start( "etails volume group in!o !or the har# #is&(

importvg -y (vg name (pv Import a volume group !rom a #is&( importvg (pv Same as a%ove %ut 8: will %e calle# vg// etc( chvg -S (y6n (vg name ;urns on6o!! Suorum chec&ing on a vg(

Logical 8olumes (L8Ms ---------------------lslv (lv lslv -l (lv Lists the logical volume #etails Lists the physical volume which the L8 is on Create a logical volume Creates a name# logical volume

m&lv (vg (No o! ??Ms (pv Name optional m&lv -y (lv (??Ms (pv name optional chlv -n (new lv (ol# lv e$ten#lv (lv (e$tra No o! ??Ms rmlv (lv

Rename a logical volume Increase the si9e o! an L8 Remove a logical volume

m&lv6e$ten#lv -a @ ?? alocation policy -am @ mi##le -ac @ center -ae @ e#ge -aie @ inner e#ge -aim @ inner mi##le migratepv -l (lv (ol# pv (new pv Move a logical volume %etween physical volumes( <oth physical volumes must %e in the same volume group R m&lv -y (lv -t >!slog (vg (No o! ??Ms (pv Name optional Creates a ULSlog logical volume( log!orm (6#ev6lv getlvc% -2; (lv Lile Systems (LSMs ------------------ls!s Lists all !ilesystems ls!s -J (!s Lists the !ile system #etails mount Lists all the mounte# !ilesystems mount (!s or lv Mounts a name# !ilesystem mount -a Mounts all !ilesystems mount all mount -r -v c#r!s 6#ev6c#/ 6c#rom mounts c#/ #rive over 6c#rom cr!s -v >!s -#(lv -m(mount point -2 yes Fill create a !ile system on the whole o! the logical volume' a##s entry into 6etc6!ilesystems an# will create mount point #irectory i! it #oes not e$ist( cr!s -v >!s -g(vg -m(mount point -a si9e@(si9e o! !s -2 yes Fill create a logical volume on the volume group an# create the !ile system on the logical volume( 2ll at the si9e state#( Fill a## entry into 6etc6!ilesystems an# will create the mount point #irectory i! it #oes not e$ist( ch!s -2 yes (!s Change !ile system to 2uto mount in 6etc6!ilesystems ch!s -a si9e@(new !s si9e (!s Change !ile system si9e rm!s (!s Removes the !ile system an# will also remove the L8 i! there are no onther !ile systems on it( Reports the !ragment status o! the !ile system( Runs in report only #e!rag mo#e (no action ( "e!ragments a !ile system( Initialises an L8 !or use as an ULSlog "isplays Logical 8olume Control <loc& in!ormation

#e!rag -J (!s #e!rag!s -r (!s #e!rag!s (!s

!sc& (!s 8eri!y a !ile system' the !ile system must %e unmounte#R !sc& (-y or -n (!s ?re-answer Juestions either yes or no R !sc& -p (!s Fill restore primary super%loc& !rom %ac&up copy i! the super%loc& is corrupt( Mirroring

--------m&lv -y (lv -c(copies 0 or . (vg (No o! ??Ms (?8 Name optional Creates a mirrore# name# logical volume( m&lvcopy -s n (lv (copies 0 or . (pv Creates a copy o! a logical volume onto another physical volume( ;he physical volume MUS; %e in the same volume group as the orginal logical volume R rmlvcopy (lv (copies + or 0 rmlvcopy (lv (copies + or 0 (pv syncvg -p (pv syncvg -l (lv syncvg -v (vg Removes logical volume copies( Lrom this pv onlyR Synchroni9e logical partion copies

mirrorvg (vg (pv Mirrors the all the logical volumes in a volume group onto a new physical volume( New physical volume must alrea#y %e part o! the volume group( -------------------------------------------------------------------------------<OO; LO:IC2L 8OLUME (<L8 -------------------------------------------------------------------------------%ootlist -m (normal or service -o %ootlist -m (normal or service (list o! #evices %ootin!o -% %ootin!o -t m&%oot -c -# (6#ev6pv save%ase -# (6#ev6pv #isplays %ootlist change %ootlist

I#enti!ies the %oota%le #is& Speci!ies type o! %oot Creates a complete %oot image on a physical volume( 4eroMs out the %oot recor#s on the physical volume( Saves customise# O"M in!o onto the %oot #evice(

%os%oot -a -# (6#ev6pv

-------------------------------------------------------------------------------SNS;EM "UM? -------------------------------------------------------------------------------sys#ump#ev -l sys#ump#ev -e sys#ump#ev -L sys#umpstart -p sys#umpstart -s Lists current #ump #estination( Estimates #umpsi9e o! the current system in %ytes( "isplays in!ormation a%out the previous #ump( Starts a #ump an# writes to the primary #ump #evice( Starts a #ump an# writes to the secon#ary #ump #evice(

(MC2 machine can also #ump i! &ey is in service position an# the reset %utton is presse# sys#ump#ev -p (#ump #evice -? Sets the #e!ault #ump #evice' permanently 2nalyse #ump !ile 5echo KstatPn statusPn t -mK = crash 6var6a#m6ras6vmcore(/ -------------------------------------------------------------------------------?2:IN: S?2CE (?SMs -------------------------------------------------------------------------------lsps -a lsps -s lsps (ps Lists out all paging space "isplays total paging an# total useage

m&ps -s(No o! -M %loc&s -n -a (vg m&ps -s(No o! -M %loc&s -n -a (vg (pv -n @ #onMt activate6swapon now -a @ activate6swapon at re%oot chps -a n (ps ;urns o!! paging space(

chps -s(No o! -M %loc&s (ps chlv -n (new name (ol# name rmps (ps

Increases paging space( Change paging space name

Remove paging space( ?S must have %een turne# o!! an# then the system re%oote# %e!ore it can %e remove#(

Note 5 Nee# to change the swapon entry in 6s%in6rc(%oot script i! you are changing the #e!ault paging space !rom 6#ev6h#*( Nou also nee# to #o a K%os%oot -a -# 6#ev6h#is&$K %e!ore the re%oot( 6etc6swapspaces Lile that lists all paging space #evices that are activate#6swapon #uring re%oot(

-------------------------------------------------------------------------------SCCE"ULIN: -------------------------------------------------------------------------------cronta% -l cronta% -e cronta% -l 3 (!ilename cronta% (!ilename cronta% -r cronta% -v 6var6a#m6cron6cron(allow 6var6a#m6cron6cron(#eny 6var6a#m6cron6cronta% List out cronta% entrys E#it cronta% entrys Output cronta% entrys to a !ile Enter a cronta% !rom a !ile Removes all cronta% entrys "isplays cronta% su%mission time( Lile containing users allowe# cronta% use( Lile containing users #enie# cronta% use( "irectory containing users cronta% entries( Sche#ule a >o% using at

at (now Q 0 minutes' +.5/D' etc VreturnW Comman# or schell script VreturnW VC;RL "W at -l atJ at -r (at >o% No atrm (at >o% No

Lists out >o%s sche#ule# to run via at comman# Removes an at >o% sche#ule# to run(

6var6a#m6cron6at(allow Lile containing users allowe# at use( 6var6a#m6cron6at(#eny Lile containing users #enie# at use( 6var6a#m6cron6at>o%s "irectory containing users at entries( -------------------------------------------------------------------------------SECURI;N -------------------------------------------------------------------------------groups setgroups Lists out the groups that the user is a mem%er o! Shows user an# process groups Changes !iles6#irectory permissions

chmo# a%c# (!ilename

Fhere a is (- SUI" Q (0 S:I" Q (+ S8;) % is (- rea# Q (0 write Q (+ e$ecute permissions !or owner c is (- rea# Q (0 write Q (+ e$ecute permissions !or group # is (- rea# Q (0 write Q (+ e$ecute permissions !or others -rw$rw$rw$ -rw$rw$rw$ -rw$rw$rw$ === === === = = = Owner :roup Others -rwSrw$rw$ @ SUI" -rw$rwSrw$ @ S:I" #rw$rw$rwt @ S8;)

chown (new owner (!ilename chgrp (new group (!ilename umas& umas& a%c

Changes !ile6#irectory owners Changes !ile6#irectory groups "o %oth RRR

chown (new owner ((new group (!ilename

"isplays umas& settings Changes users umas& settings

where ( , - a @ new !ile rea# permissions ( , - % @ new !ile write permissions ( , - c @ new !ile e$ecute permissions eg umas& /00 @ new !ile permissions o! ,DD @ rea# write an# e$ecute !or owner rea# ----- an# e$ecute !or group rea# ----- an# e$ecute !or other mrgpw# 3 !ile(t$t passw# pw#a#m (username pw#c& -t 2LL Creates a stan#ar# passwor# !ile in !ile(t$t Change current user passwor# Change a users passwor# 8eri!ies the correctness o! local authentication

lsgroup 2LL Lists all groups on the system m&group (new group Creates a group chgroup (attri%ute (group Change a group attri%ute rmgroup (group Removes a group -------------------------------------------------------------------------------USERS -------------------------------------------------------------------------------passw# -! passw# -s ch!n (username chsh (username (shell env printenv i# i# (user whoami who am i who w who -% uptime Change current users gecos (user #escription Change current users shell Changes users gecos Changes users shell

"isplays values o! environment varia%les "isplays current userMs ui# an# gi# #etails "isplays user ui# an# gi# #etails "isplays current user #etails (or who -m "isplays #etails o! all users currently logge# in( "isplays system re%oot time "isplays num%er o! users logge# in' time since last re%oot' an# the machine loa# averages(

lslicense "isplays num%er o! current user licensese chlicense -u (num%er Changes the num%er o! user licenses lsuser 2LL Lists all users #etails lsuser (username Lists #etails !or user lsuser -a(attri%ute (username or 2LL Lists user attri%utes lsuser -a home 2LL m&user -a(attri%utes (newuser chuser (attri%utes (user 2## a new user Change a user

chuser login@!alse (user rmuser -p (user usrc& -t 2LL !user -u (logical volume

Loc& a user account Removes a user an# all entries in security !iles

Chec&s all the user entires are o&ay( "isplays processes using the !iles in that L8

lsattr -" -l sys/ -a ma$uproc "isplays ma$ num%er o! processes per user ch#ev -l sys/ -a ma$uproc@(num%er Changes ma$ num%er o! processes per user -------------------------------------------------------------------------------REMO;E USERS -------------------------------------------------------------------------------ruser -a -! (user ruser -a -p (host ruser -a -r (host ruser -# -! (user ruser -# -p (host ruser -# -r (host ruser -s -L ruser -s -? ruser -s -R ruser -) -L ruser -) -? ruser -) -R 2##s entry into 6etc6!tpusers !ile 2##s entry into 6etc6host(lp# !ile 2##s entry into 6etc6hosts(eJuiv !ile "eletes entry in 6etc6!tpusers !ile "eletes entry in 6etc6host(lp# !ile "eletes entry in 6etc6hosts(eJuiv !ile Shows all entries in 6etc6!tpusers !ile Shows all entries in 6etc6host(lp# !ile Shows all entries in 6etc6hosts(eJuiv !ile "eletes all entries in 6etc6!tpusers !ile "eletes all entries in 6etc6host(lp# !ile "eletes all entries in 6etc6hosts(eJuiv !ile

-------------------------------------------------------------------------------INI;;2< -------------------------------------------------------------------------------telinit S telinit 0 telinit J Switches to single user mo#e( Switches to multi user mo#e( Re-e$amines 6etc6initta%

lsita% -a Lists all entries in initta% lsita% (i#ent eg tty+ Lists the tty+ entry in initta% m&ita% (K#etailsK chita% (K#etailsK rmita% (i#ent eg tty+ Creates a new initta% entry 2mmen#s an e$isting initta% entry Removes an initta% entry(

chita% Ktty+505respawn56usr6%in6getty 6#ev6tty+K -------------------------------------------------------------------------------O"M -------------------------------------------------------------------------------o#mget -J Kname@lp+K Cu"v =more o#mget -J Kname-lp+K Cu2t =more o#m#elete -o Cu2t -J Kname@lp+K :ets lp+ in!o !rom pre-#e!ine# #ata%ase( :ets lp+ in!o !rom customise# #ata%ase( "eletes lp+ in!o !rom customise# #%(

o#mget -J Kname@lp+K Cu2t 3 lp+(Cu2t E$port O"M in!o to te$t !ile( o#ma## O lp+(Cu2t Import O"M in!o !rom te$t !ile( -------------------------------------------------------------------------------ERROR LO::IN: -------------------------------------------------------------------------------6usr6li%6err#emon -l 6usr6li%6err#emon "isplays errorlog attri%utes( Starts error logging(

6usr6li%6errstop errpt errpt -a errpt -> (i#enti!ier

Stops error logging( "isplays summary errorlog report( "isplays #etaile# errorlog report( "isplays singe errorlog report(

Note 5 errorlog classes are C@Car#ware S@So!tware O@In!ormation 8@Un#etermine# errclear (#ays "eletes all error classes in the errorlog( errclear -# (class (#ays "eletes all error class entries in errlog( Note 5 ;he errclear comman# will #elete all entries ol#er than the num%ers o! #ays speci!ie# in the #ays paramenter( ;o #elete 2LL entries use# /( errlogger Kmessage up to 0./ chrsK Enters an operator noti!action message into the errorlog( -------------------------------------------------------------------------------?ERLORM2NCE MONI;ORIN: -------------------------------------------------------------------------------vmstat (#rive (interval (count vmstat h#is&/ D 0/ vmstat -s vmstat -! vmstat -i Reports virtual memory statistics(

"iplays num%er o! paging events since system start( "iplays num%er o! !or&s since system start( "iplays num%er o! interupts %y #evice since system start( Reports i6o an# cpu statistics(

iostat (#rive (interval (count iostat h#is&/ D 0/

iostat -# (#rive (interval (count Limits report to #rive statistics( iostat -t (interval (count Limits report to tty statistics( sar -u -? 2LL +/ +/ "isplays Xusr Xsys Xwio Xi#le !or all processors -------------------------------------------------------------------------------"OS "ISGE;;ES -------------------------------------------------------------------------------#os#ir #os#ir (#irectory Rea#s #irectory listing o! a #is&ette Rea#s #irectory listing o! a name# #irectory :ets C-+(;); !rom #is&ette #rive !#/

#osrea# -"6#ev6!#/ C-+(;); c-+(t$t

#osrea# -"6#ev6!#/ "IREC;ORN6C-+(;); c-+(t$t (-" option can %e #roppe# i! using !#/ #oswrite -"6#ev6!#/ (uni$!ile (#os!ile #os#el (#os!ile #os!ormat Frites a !ile to #is&ette "eletes a #os !ile on #is&ette Lormats the #is&ette

-------------------------------------------------------------------------------SEN"M2IL -------------------------------------------------------------------------------sen#mail -%i newaliases sen#mail -%p mailJ sen#mail -J Creates new aliase #% !rom 6etc6aliase !ile( "isplays the contents o! the mail Jueue ?rocesse the sen#mail Jueue NOF

sen#mail -%t -#/(- O 6#ev6null ?rints out sen#mail version' compile #e!ines an# system in!ormation

re!resh -s sen#mail &ill -l (sen#mail ?I"

Restart sen#mail

-------------------------------------------------------------------------------S? 6 ?SS? -------------------------------------------------------------------------------#sh (comman# Runs the comman# on all the no#es E!ence "iplays which no#e are currently !ence# E!ence (no#e num%er Lences the no#e Eun!ence (no#e num%er Estart Un!ences the no#e Starts the switch

spmon -J Starts S? monitor in gui spmon -# -: "iag in!o' lists LE" an# switch in!o !or all no#es spmon -L !rame+6no#e. "isplays LE" !or no#e . in !rame + spmon -p o!! !rame+6no#e. spmon -p on !rame+6no#e. sple# ?owers o!! the no#e ?owers on the no#e

"iplays all the no#es LE"Ms in a up#ating gui

s+term -w (!rame num%er (no#e num%er Opens serial terminal (rea# an# write s+term (!rame num%er (no#e num%er Opens serial terminal (rea# only E$ample 5s+term + + Opens a serial terminal to console port on !rame + no#e + which is rea# only( Fhen re%ooting a no#e use rea# only( splst#ata -e Lists site environment #ata%ase in!ormation -# "isplays #! comman# !rom each no#e -n Lists no#e con!iguration -h "iplays lsc!g comman# !rom each no#e -s Lists switch no#e in!ormation -% Lists %oot6installation in!ormation -a Lists L2N #ata%ase in!ormation -i "isplays netstat -in comman# !rom each no#e

Potrebbero piacerti anche