Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
40 views13 pages

Rhcsa Cheatsheet PDF File System Command Line Interface

The document contains a study guide for the RHCSA certification exam compiled by an individual studying for the exam. It provides over 100 bullet points covering essential Linux commands and concepts related to shells, files, users/groups, permissions, processes and more. The notes are intended to help evaluate one's readiness for the exam objectives but do not guarantee what will be on the exam.

Uploaded by

markdkm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views13 pages

Rhcsa Cheatsheet PDF File System Command Line Interface

The document contains a study guide for the RHCSA certification exam compiled by an individual studying for the exam. It provides over 100 bullet points covering essential Linux commands and concepts related to shells, files, users/groups, permissions, processes and more. The notes are intended to help evaluate one's readiness for the exam objectives but do not guarantee what will be on the exam.

Uploaded by

markdkm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

 

A reader of my blog who shall be named C.D. sent me his RHCSA study notes. C.D. will be taking
the EX200 eam here in a few days! and thus didn"t offi#ially $oin the 20%2 Red Hat Study &uddy
grou'! howe(er he wanted to share his ra'id)fire study guide for others to benefit from.

*he study notes are in #a'sule form and follow C.D."s understanding of the E200 ob$e#ti(es. *hey
#an be a good guide for anyone looking to e(aluate their own readiness for the offi#ial eam.

+lease understand that these notes were #om'iled by an indi(idual in 're'aration for taking the
RHCSA eam. *his is sim'ly a study guide that attem'ts to 'ro(ide answers and information based
on the ,eam ob$e#ti(es" 'ro(ided on Red Hat"s website. *his information does not 'ro(ide s'e#ifi#
information about what is or what is not on the RHCSA eam. *his is not a -brain dum' or some
other form of #heat sheet.

Behold, the notes:


1) Understand and use essential tools
Access a shell prompt and issue commands with correct syntax

• C*R/)A/*)%1 rom system #onsole! swit#h to 34.


• C*R/)A/*)52)671 rom system #onsole! swit#h to a terminal.
• A''li#ations )8 System *ools )8 *erminal1 rom 34! a##ess a terminal.

Use input-output redirection

• #md 8 file1 Redire#t stdout of #md to file.


• #md 28 file1 Redire#t stderr of #md to file.
• #md 88 file1 A''end stdout of #md to file.
• #md 288 file1 A''end stderr of #md to file.
• #md 98 file1 Redire#t stdout and stderr to file.
• #md : file1 Redire#t #ontents of file to stdin of #md.
• #md% ; #md21 Redire#t stdout of #md% to stdin of #md2.
• #md% ;9 #md21 Redire#t stderr of #md% to #md2.

Use grep and regular expressions to analyze text

• gre' string file1 Dis'lay lines in file that #ontain string.


• gre' )( string file1 Dis'lay lines in file that do not #ontain string.
• gre' )i string file1 Case in sensiti(edsear#h.
• egre'1 re' with etended regular e'ressions.
• fgre'1 re' without regular e'ressions.

Some simple Regx rules! "A complete understanding o# Regular xpressions is $eyond the
scope o# this document!)

• ,<string=1 Sear#h for lines beginning with string.


• ,5a)>A)?7=1 Sear#h for any line #ontaining a letter.
 

• ,5<a)>A)?7=1 Sear#h for any line not #ontaining a letter.


• ,50)@7=1 Sear#h for any line #ontaining a number.
• ,5<0)@7=1 Sear#h for any line not #ontaining a number.
• ,50)@750)@7=1 Sear#h for any line #ontaining at least two numbers in a row.

Access remote system using ssh and %&'

• ssh userhost1 /ogin to host as user (ia SSH.


• (n#(iewer host1dis'lay1 Conne#t to dis'lay on host (ia BC.
• ssh )/ 'ort1host1'ort userhost1 Conne#t to dis'lay on host (ia BC o(er SSH.

(og in and switch users in multiuser runleels

• su )1 Swit#h to root user and load root user"s 'rofile.


• su  user1 Swit#h to user and load user"s 'rofile.
• su )# ,#ommand=1 Run #ommand as root user.
• su )# ,#ommand" user1 Run #ommand as user.

Archie, compress, unpac*, and uncompress #iles

• g>i' file1 Com'ress file using g>i'.


• b>i'2 file1 #om'ress file using b>i'2.
• g>i' )d file.g>1 De#om'ress file using g>i'.
• b>i'2 )d file.b>21 De#om'ress file using b>i'2.
• tar #(f file.tar dir1 Create ar#hi(e file.tar of #ontents of dir.
• tar #(f> file.tar.g> dir1 Ar#hi(e with g>i' #om'ression.
• tar #(f$ file.tar.b>2 dir1 Ar#hi(e with b>i'2 #om'ression.
• tar (f file.tar dir1 Etra#t ar#hi(e file.tar into dir.
• tar (f> file.tar.g> dir1 Etra#t g>i' #om'ressed ar#hi(e.
• tar (f$ file.tar.b>2 dir1 Etra#t b>i'2 #om'ressed ar#hi(e.
• star )attr )HFeustar )# )fFfile.star dir1 Ar#hi(e with SE/inu.
• star ) )fFfile.star1 Etra#t ar#hi(e with SE/inu.
• star )> )fFfile.star.g>1 Etra#t g>i' #om'ressed ar#hi(e with SE/inu.
• star )$ )fFfile.star.b>21 Etra#t b>i'2 #om'ressed ar#hi(e with SE/inu.

'reate and edit text #iles

• 8file1 Create file with no #ontent.


• (i file1 Edit #ontent of file.

'reate, delete, copy, and moe #iles and directories

• 8file1 Create file with no #ontent.


• rm file1 Delete file.
• #' file% file21 Co'y file% to file2.
 

• m( file% file21 Go(e file% to file2.


• mkdir dir1 Create dire#tory dir.
• mkdir )' dir%dir2dir1 Create a series of dire#tories.
• rmdir dir1 Delete an em'ty dire#tory.
• rmdir )' dir%dir2dir1 Delete a series of em'ty dire#tories.
• rm )r dir1 Re#ursi(ely delete a dire#tory and it"s #ontents.
• m( dir% dir21 Go(e dire#tory dir% to dir2.

'reate hard and so#t lin*s

• Hard)links #reates a se#ond #o'y of the file with identi#al inode.


• Soft)links #reates a redire#t to the original file.
• ln file% file21 Creates files2 as a hard)link of file%.
• ln )s file% file21 Creates file2 as a soft)link of file%.

(ist, set, and change standard ugo+rwx permissions

• ls )l1 /ist files and in#lude information about 'ermissions.


• #hown user file1 Changes owner of file to user.
• #hown )R user dir1 Re#ursi(ely #hanges owner of dire#tory and #ontents.
• #hown user.grou' file1 Changes owner of file to user and grou'.
• #hown )R user.grou' dir1 Re#ursi(ely #hanges owner of dire#tory and #ontents.
• #hgr' grou' file1 Changes grou' owner of file to grou'.
• #hgr' )R grou' dir1 Re#ursi(ely #hanges grou' owner of dire#tory and #ontents.
• #hmod 'ermissions file1 Changes 'ermissions of file.
• #hmod )R 'ermissions dir1 Re#ursi(ely #hanges 'ermissions of dire#tory and #ontents.
• umask1 Dis'lays #urrent umask.
• umask mask1 Sets umask to mask.
• Iith #hmod or umask! the 'ermissions or mask are a three digit number.
• *he first digit is for owner! the se#ond is for grou'! the third for all others.
• Ea#h number is made by adding together the numbers of following 'ermissions1 J F read! 2
F write! % F ee#ute.
• #hmod KKK sets thos 'ermissions
• e1 #hmod 6J0 is read and write for owner! read for grou'! no a##ess for all others.
• umask KKK are the 'ermissions subtra#ted from the default 'ermissions L666M of a newly
#reated file.
• e1 umask 002 means news files are #reated with the 'ermissions 66J.

(ocate, read, and use system documentation

• man to'i#1 Dis'lays manual 'age for to'i#.


• man K to'i#1 Dis'lays manual 'age for to'i# within numbered #ategory.
• whatis to'i#1 /ists manual 'ages with to'i# in title.
 

• a'ro'os to'i#1 /ists manual 'ages relating to to'i#.


• et##ron.dailymakewhatis.#ron1 Regenerates manual 'age database.
• info to'i#1 Dis'lay info 'age about to'i#.
• usrshareinfo1 /o#ation of all a(ailable info 'ages.
• usrsharedo#1 /o#ation of more ad(an#ed 'a#kage s'e#ifi# do#umentation.

) perate running systems


Boot, re$oot, and shut down a system normally

• reboot1 Reboot the system immediately.


• shutdown )h now1 Shutdown the system immediately.

Boot systems into di##erent runleels manually

• runle(el1 Dis'lays the #urrent runle(el.


• init K1 Changes to s'e#ified runle(el.
• At R3& menu! 'ress -e or -a to edita''end boot kernel o'tions.
• A''end a runle(el K to end of R3& o'tions to boot into that runle(el.
• Runle(el 01 Halt
• Runle(el %1 Single)user mode
• Runle(el 21 Gulti)user mode! limited ser(i#es
• Runle(el 1 Gulti)user mode! networking
• Runle(el J1 3ndefined
• Runle(el N1 Gulti)user mode! X%%
• Runle(el 61 Reboot

Use single-user mode to gain access to a system

• At R3& menu! 'ress -e or -a to edita''end boot kernel o'tions.


• A''end single to end of R3& o'tions to boot into single user mode.
• A''end initFbinsh to end of R3& o'tions to not load init files.

.denti#y, ad/ust priority, and *ill processes!

• 's )u user1 /ist all 'ro#esses running as user.


• 's )au1 /ist all running 'ro#esses.
• 's )al1 /ist all running 'ro#esses and 'arent 'ro#ess information.
• ni#e )n K #ommand1 Run #ommand at s'e#ified 'riority le(el.
• reni#e K +4D1 Changes 'riority le(el of 'ro#ess to s'e#ified 'riority le(el.
• reni#e K )u user1 Changes 'riority le(el of all of user"s 'ro#esses to s'e#ified 'riority le(el.
• *he default 'ro#ess 'riority le(el is 0.
• *he highest 'ro#ess 'riority le(el is )20.
• *he lowest 'ro#ess 'riority le(el is %@.
• kill +4D1 Sends a signal to s'e#ified 'ro#ess.
 

• killall 'ro#ess1 Sends a signal to all running 'ro#esses of that name.


• *he default signal sent to 'ro#esses is S4*ERG.
• Other signals #an be sent by adding the flag )S4A/.
• %1 S4H3+
• 21 S44*
• 1 S4P34*
• 61 S4A&R*
• @1 S4Q4//
• %J1 S4A/RG
• %N1 S4*ERG LdefaultM
• to'1 /ists all running 'ro#esses in an intera#ti(e en(ironment.

(ocate and interpret system log #iles

• (arlog1 /o#ation of system log files.


• lastlog1 Out'uts information about most re#ent login of ea#h user based on information in
(arloglastlog
• utm'dum' btm'1 Out'uts information about failed login attem'ts based on information in
(arlogbtm'
• utm'dum' wtm'1 Out'uts information about logins based on information in (arlogwtm'

Access a irtual machine0s console

• (irt)manager1 34 'rogram for #ontrolling (irtual ma#hines.


• (irsh list all1 /ists all (irtual ma#hines.
• (irt)(iewer ser(er1 Dis'lay gra'hi#al #onsole for(irtual ser(er.

Start and stop irtual machines

• (irt)manager1 34 'rogram for #ontrolling (irtual ma#hines.


• (irsh start name1 Starts a (irtual ma#hine.
• (irsh destroy name1 Shutdown a (irtual ma#hine.
• (irsh list all1 /ists all (irtual ma#hines.

Start, stop, and chec* the status o# networ* serices

• ser(i#e name start1 Starts network ser(i#e.


• ser(i#e name sto'1 Sto's network ser(i#e.
• ser(i#e name restart1 Restarts network ser(i#e.
• ser(i#e name reload1 Reloads the #onfiguration files for network ser(i#e.
• ser(i#e name status1 Dis'lays status of network ser(i#e.

) 'on#igure local storage


(ist, create, delete, and set partition type #or primary, extended, and logical partitions
 

• fdisk1 De're#ated utility for mani'ulating 'rimary! etended! and logi#al 'artitions.
• 'arted1 Current utility for mani'ulating 'rimary! etended! and logi#al 'artitions.
• *he fdisk and 'arted #ommands are intera#ti(e and ha(e their own built)in hel' files.
Consult man 'ages for further o'tions.

'reate and remoe physical olumes, assign physical olumes to olume groups, and create
and delete logical olumes

• '(#reate de(hd1 Create 'hysi#al (olume from de(i#e.


• '(remo(e de(hd1 Remo(e 'hysi#al (olume from an /BG.
• (getend (olumegrou' de(hd1 Create (olume grou' with 'hysi#al (olume or add 'hysi#al
(olume to eisting (olume grou'.
• (gredu#e (olumegrou' de(hd1 Remo(e 'hysi#al (olume from (olume grou'.
• l(#reate )/ si>e (olumegrou'1 Create a new logi#al (olume from (olume grou'.
• l(dis'lay (olumegrou'1 Dis'lay information about (olume grou'.
• l(remo(e de((olumegrou'(olume1 Remo(e a logi#al (olume from (olume grou'.

'reate and con#igure (U2S-encrypted partitions and logical olumes to prompt #or password
and mount a decrypted #iles system at $oot

• dd ifFde(urandom ofFde(hd bsF%G1 ill 'hysi#al (olume with random data.


• #ry'tsetu' luksormat de(hd1 /3QS)en#ry't 'hysi#al (olume.
• #ry'tsetu' luksO'en de(hd label1 /abel /3QS)en#ry'ted 'hysi#al (olume.
• mkfs.etJ de(ma''erlabel1 ormat labelled /3QS)en#ry'ted 'hysi#al (olume.
• et##ry'ttab1 Configuration file for /3QS)en#ry'ted (olumes.
• et#fstab1 Configuration file for (olumes mounted by system.
• mount1 Dis'lays all (olumes #urrently mounted on system.
• mount )a1 Gount all (olumes defined in et#fstab
• fstab entries are s'a#e delimited1 de(i#e mount'oint fsty'e o'tions dum' fs#k
• fstab eam'le1 de(sda%  etJ defaults!a#l % %
• #ry'tab entries are s'a#e delimited1 label de(i#e
• #ry'tab eam'le1 #ry't(olume de(sdb%

'on#igure systems to mount #ile systems at $oot $y Uniersally Uni3ue .4 "UU.4) or la$el

• blkid1 ind the 334D of a de(i#e.


• e2label de(ma''er(olume label1 /abel a (olume.
• umount de(hd1 3nmount a de(i#e.
• et#fstab1 Configuration files for (olumes mounted by system.
• fstab entries are s'a#e delimited1 de(i#e mount'oint fsty'e o'tions dum' fs#k
• fstab eam'le1 de(sda%  etJ defaults!a#l % %

Add new partitions and logical olumes, and swap to a system non-destructiely

• *he fdisk and 'arted #ommands are intera#ti(e and ha(e their own built)in hel' files.
 

Consult man 'ages for further o'tions.


• '(#reate de(hd 'hysi#al(olume1 Create a 'hysi#al (olume from de(i#e.
• (g#reate (olumegrou' de(hd1 Create a (olume grou' from a 'hysi#al (olume.
• l(#reate )/ si>e )n logi#al(olume logi#al(olumegrou'1 Create a logi#al (olume of si>e in
(olume grou'.
• swa'on )s1 Dis'lays swa' de(i#es #urrently on system.
• swa'on )( de(hd1 Add swa' de(i#e to system.

5) 'reate and con#igure #ile systems


'reate, mount, unmount, and use ext, ext, and ext5 #ile systems

• mkfs.etK de(hd1 ormat de(i#e as etK ile System.


• mount )o rw )t etK de(hd mount'oint1 Gount"s de(i#e of etK format in ReadIrite mode
to mount 'oint.
• umount de(hd1 3nmounts de(i#e.

6ount, unmount, and use (U2S-encrypted #ile systems

• Gounting a /3QS)en#ry'ted file system is identi#al to mounting a regular file system!


e#e't you will be 'rom'ted for a 'ass'hrase.

6ount and unmount '.7S and &7S networ* #ile systems

• mount )t #ifs ser(ernamedir mount'oint (erbose )o userFusername1 Gounts a C4S


filesystem to mount 'oint.
• mount )o rw )t nfs ser(ername1dir mount'oint1 Gounts a S filesystem to mount 'oint.
• umount mount'oint1 3nmounts a mount'oint.

'on#igure systems to mount ext5, (U2S-encrypted, and networ* #ile systems automatically

• blkid1 ind the 334D of a de(i#e.


• et##ry'ttab1 Configuration file for /3QS)en#ry'ted (olumes.
• et#fstab1 Configuration file for (olumes mounted by system.
• mount1 Dis'lays all (olumes #urrently mounted on system.
• mount )a1 Gount all (olumes defined in et#fstab
• fstab entries are s'a#e delimited1 de(i#e mount'oint fsty'e o'tions dum' fs#k
• fstab eam'le1 de(sda%  etJ defaults!a#l % %
• #ry'tab entries are s'a#e delimited1 label de(i#e
• #ry'tab eam'le1 #ry't(olume de(sdb%

xtend existing unencrypted ext5-#ormatted logical olumes

• l(dis'lay1 Dis'lays infomration about logi#al (olumes on system.


• l(etend )/ si>e de((olumegrou'(olume1 Etends logi#al (olume by si>e.
• l(etend )/ si>e de((olumegrou'(olume1 Etends logi#al (olume to si>e.

'reate and con#igure set-8.4 directories #or colla$oration


 

• #hmod gs1 Changes a dire#tory to be set)4D.

'reate and manage Access 'ontrol (ists "A'(s)

• ilesystem must su''ort A##ess Control /ists.


• Add ,a#l" to o'tions in et#fstab and remount filesystem if this o'tion is not already set.
• mount )o remount mount'oint1 Remounts a mount'oint that is in use! a''lying any new
o'tions.
• et#fstab1 Configuration file for (olumes mounted by system.
• getfa#l file1 Dis'lays the A##ess Control /ists LAC/sM set on a file.
• setfa#l )m A1C1/ file1 Sets the A##ess Control /ists LAC/sM set on a file.

4iagnose and correct #ile permission pro$lems

• ls )l1 Dis'lay file 'ermissions.

9) 4eploy, con#igure, and maintain systems


'on#igure networ*ing and hostname resolution statically or dynamically

• setu'1 Command line system for #onfiguring networking related o'tions.


• et#hosts1 /o#al looku' table for stati#ally defined hosts.
• et#resol(.#onf1 Configuration file for resol(ing hosts.
• etssys#onfignetwork1 Configuration file for system networking settings.
• et#sys#onfignetwork)s#ri'ts1 Configuration files for interfa#e s'e#ifi# networking settings.

Schedule tas*s using cron

• #rontab )l1 Dis'lays #rontab for #urrent user.


• #rontab )e1 Edits #rontab for #urrent user.
• Cron entries reuire si s'a#e delimited o'tions.
• Ea#h o'tion #an either be a T! something within the range! a #omma se'arated list in(ol(ing
the range! or di(ision math in(ol(ing the range.
• *he #ommand will be triggered whene(er all #onditions mat#h.
• %1 Ginute L0)N@M
• 21 Hour L0)2M
• 1 Day of Gonth L%)%M
• J1 Gonth L%)%2M
• N1 Day of Ieek L0)6! starting at SundayM
• 61 Command to be ee#uted.
• eam'le1 0  % %)%22 T #ommand! will run #ommand at 100am on the first day of e(ery
other month.

'on#igure systems to $oot into a speci#ic runleel automatically

• et#inittab1 Edit to make runle(el #hanges 'ermanent.


 

.nstall Red at nterprise (inux automatically using 2ic*start

• system)#onfig)ki#kstart1 34 for #reating ki#kstart files.


• rootana#onda)ks.#fg1 Qi#kstart file for running system at time of #reation.
• or a bare metal ki#kstart enter R3& an add the following line1
• ksFhd1sdba%ks.#fg1 3se a ki#kstart file on the lo#al disk.
• ks)#drom1ks.#fg1 3se a ki#ksart file on the #drom.
• ksFft'1ser(erks.#fg1 3se a ki#kstart file on an *+ ser(er.
• ksFnfs1ser(erks.#fg1 3se a ki#kstart file on an S ser(er.
• ksFhtt'1ser(erks.#fg1 3se a ki#kstart file on a web ser(er.
• or (irtual ma#hines add an o'tion to (irt)install similar to baremetal ki#kstart o'tions1
• e1 ) -ksFQ4CQS*AR*O+*4O ksde(i#eFE*HERE*DEB4CE i'F4+ADDRESS
netmaskFE*GASQ gatewayFA*EIAU
• *here are numerous ki#kstart o'tions a(ailable. Running ,system)#onfig)ki#kstart
rootana#onda)ks.#fg" is your best bet short of memori>ing all o'tions.

'on#igure a physical machine to support irtual guests

• yum )y install lib(irt lib(irt)#lient 'ython)(irtinst emu)k(m (irt)manager (irt)to' (irt)


(iewer1 4nstall 'a#kages needed for hosting QBGs.
• yum )y install emuT (irtT lib(irtT 'ython)(irtinst1 4nstalls all 'a#kages related to hosting
QBGs.
• mod'robe k(m1 Adds kernel module for hosting QBGs.

.nstall Red at nterprise (inux systems as irtual guests

• (irt)manager1 34 'rogram for #ontrolling (irtual ma#hines.


• (irsh list all1 /ists all (irtual ma#hines.

'on#igure systems to launch irtual machines at $oot

• (irsh autostart name1 Configures (irtual ma#hine to start at boot.


• (irsh autostart disable name1 Disabled (irtual ma#hines from starting at boot.

'on#igure networ* serices to start automatically at $oot

• #hk#onfig list1 /ists all installed network ser(i#es.


• #hk#onfig ser(i#e on1 Configures network ser(i#e to start at boot.
• #hk#onfig le(el K ser(i#e on1 Configures network ser(i#e to start in s'e#ified runle(els.
• #hk#onfig ser(i#e off1 Disables network ser(i#e from starting at boot.
• #hk#onfig le(el K ser(i#e off1 Disables network ser(i#e from starting in s'e#ified runle(els.

'on#igure a system to run a de#ault con#iguration ;;< serer

• yum )y install htt'd 99 #hk#onfig htt'd on 99 ser(i#e htt'd start1 4nstall and start htt'd!
and set to start on boot.
• (arwwwhtml1 /o#ation of files ser(ed by H**+ ser(er.
 

• irewall1 O'en 'orts V0 for H**+ and JJ for H**+S! using i'tables.
• SE/inu1 Gake sure SE/inu #ontets are #orre#t for all files ser(er! ,man htt'dWselinu"
for more (arious o'tions.

'on#igure a system to run a de#ault con#iguration 7;< serer

• yum )y install (sft'd 99 #hk#onfig (sft'd on 99 ser(i#e (sft'd start1 4nstall and start
(sft'd! and set to start on boot.
• (arft'1 /o#ation of files ser(ed by *+ Ser(er.
• irewall1 O'en 'orts 20 and 2% for *+D! using i'tables.
• SE/inu1 Gake sure SE/inu #ontets are #orre#t for all files ser(er! ,man ft'dWselinu" for
more (arious o'tions.

.nstall and update so#tware pac*ages #rom Red at &etwor*, a remote repository, or #rom the
local #ile system

• rhnWregister1 Register system with Red Hat etwork.


• yum install 'a#kage1 4nstall 'a#kage from yum re'ository.
• et#yum.re'os.d1 Dire#tory #ontaining information relating to yum re'os.
• r'm )3(h 'a#kage.r'm1 3'grades R+G 'a#kage from lo#al file system.
• r'm )i(h 'a#kage.r'm1 4nstalls R+G 'a#kage from lo#al file system.

Update the *ernel pac*age appropriately to ensure a $oota$le system

• e(er u'date the kernel 'a#kage! always install a new kernel.


• r'm )i(h kernel.r'm1 4nstalls a new kernel from an r'm 'a#kage.
• yum install kernel1 4nstalls a new kernel from a yum re'ository.

6odi#y the system $ootloader

• bootgrubgrub.#onf1 Configuration files for system boot loader.

=) 6anage users and groups


'reate, delete, and modi#y local user accounts

• useradd user1 Adds user to system.


• userdel user1 Deletes user from system.
• usermod o'tions user1 Godifty a user.
• usermod o'tions1
• )d dir1 Changes the user"s home dire#tory.
• )e UUUU)GG)DD1 Changes the e'iration date of user"s a##ount.
• )f K1 Changes the number of days after 'assword e'iration that user"s a##ount is
disabled! 0 for immediately! )% for ne(er.
• )g 4D1 Changes the user"s main grou'.
• ) 4D1 Comma se'arated list of additional grou's that the user belongs to.
• )l newuser1 Changes the user"s login name to a new name.
 

• )/1 /o#ks the user a##ount! 're(enting logins.


• )s shell1 Changes the user"s login shell.
• )u 34D1 Changes the user"s 34D.
• )31 3nlo#ks the user a##ount! allowing logins.
• )? seuser1 Changes ther user"s SE/4nu user ty'e.

'hange passwords and ad/ust password aging #or local user accounts

• 'asswd1 Change your 'assword.


• 'asswd user1 Change user"s 'assword.
• #hage user1 Change user"s 'assword aging.

'reate, delete, and modi#y local group and group mem$ership

• grou's user1 /ist whi#h grou's a user belongs to.


• grou'add grou'1 Create grou'.
• grou'del grou'1 Delete grou'.
• grou'mod )n newgrou' oldgrou'1 Change the name of a grou'.
• grou'mod )g 4D grou'1 Change the 4D of a grou'.
• grou'mems )g grou' )a user1 Add a user to grou'.

'on#igure a system to use an existing (4A< directory serice #or user and group in#ormation

• yum )y install o'enlda')#lients1 4nstall the reuired O'en/DA+ #lients.


• system)#onfig)authenti#ation1 34 for #onne#ting system to eisting /DA+ dire#tory
ser(i#e.
• 4t is 'ossible to #onfigure /DA+ #onne#tions manually! but using system)#onfig)
authenti#ation is your best o'tion for the RHCSA eam.

>) 6anage security


'on#igure #irewall settings using system-con#ig-#irewall or ipta$les

• system)#onfig)firewall1 34 'rogram for modifying firewall settings.


• 4+*ables are #om'le when used from the #ommand line. 3sing the ,system)#onfig)firewall"
or ,setu'" are your best o'tions for the sim'le firewall #onfigurations reuired for the
RHCSA eam.

Set en#orcing and permissie modes #or S(inux

• getenfor#e1 Dis'lay SE/inu enfor#ing mode.


• setenfor#e K1 *oggle SE/inu enfor#ing mode on or off.
• et#selinu#onfig1 Gake 'ermanent #hanges to SE/inu enfor#ing mode.

(ist and identi#y S(inux #ile and process context

• ls )l?1 /ist file 'ermissions! with SE/inu information.


• 's )?u user1 /ist all 'ro#esses running as user! with SE/inu information.
 

• 's )?au1 /ist all running 'ro#esses! with SE/inu information.


• 's )?al1 /ist all running 'ro#esses and 'arent 'ro#ess information! with SE/inu
information.

Restore de#ault #ile contexts

• semanage f#ontet )a )t #ontet -dirL.TM1 Sets the SE/inu #ontet of a dire#tory and it"s
#ontents.
• restore#on ) )R )( dir1 Re#ursi(ely restores SE/inu #ontet of a dire#tory and it"s
#ontents.

Use $oolean settings to modi#y system S(inux settings

• getsebool )a1 /ists all SE/inu boolean settings and #urrent status.
• setsebool )+ boolean on1 Sets SE/inu boolean to on.
• getsebool )+ boolean off1 Sets SE/inu boolean to off.
• togglesebool boolean1 *oggles SE/inu boolean on or off.

4iagnose and address routine S(inux policy iolations

• ausear#h )m a(# )# #ommand1 Sear#h for SE/inu 'oli#y (iolations asso#iated with
#ommand.
• sealert )a (arlogauditaudit.log1 Detaild des#ri'tions of SE/inu 'oli#y (iolations found in
log.
• (arlogauditaudit.log1 /og file #ontaining information about SE/inu 'oli#y (iolations…

You might also like