Red Hat Certified System Administrator (RHCSA) 3rd Edition
Author: Sander Van Vugt
The Red Hat Certified System Administrator (RHCSA), 3rd edition is all new and fully updated for RHEL 8. This course is designed to teach you everything you need to know to pass the RHCSA exam. Every objective in the exam is discussed, along with in-depth lessons on complex topics, so they are not confusing. Each lesson ends with a lab, so you can dive into your own projects and see Red Hat in action; many of these labs mimic scenarios you might find on the exam, so you get the experience you need to practice for the exam. These labs also include video solutions, so you can also see in real-time how to work through the problems and figure out the best methods for working through each scenario.
- lesson 2: Using Essential Tools
- lesson 3: Essential File Management Tools
- lesson 4: Working with Text Files
- lesson 5: Connecting to a RHEL Server
- lesson 6: Managing Users and Groups
- lesson 7: Managing Permissions
- lesson 8: Configuring Networking
- lesson 9: Managing Processes
- lesson 10: Managing Software
- lesson 11: Working with Systemd
-
mandb
update manual dbman -k password
search for pages that contains word passwordman -k password | wc
count the results- unfortunatly we couldn't find any usefull results
-
man useradd
and look for command in see also section- now we found
passwd
command
-
useradd anna
add anna user firstpasswd anna
set a passwd for her
-
cd /etc
-
ls -d *[0-9]*
note-d
to list directories themselves, not their contents
-
ls -l | less
then you can pressh
to browse commands
-
- some usefull commands in vim
Esc
back to command modei
insert modea
appendo
open a new line:wq
write and quite:q!
quite and don't complaindd
delete a lineyy
copy the current linep
pasteG
goto the last line in the filegg
goto the beggining of the filed$
delete after cursor in line$
move cursor to the end of the line^
move cursor to the start of the linev
visual mode to select textu
undoCtrl + r
redo/text
search for text forword?text
search for text backword:%s/old/new
for replacing text
-
mkdir -p /tmp/files/pictures
mkdir -p /tmp/files/photos
mkdir -p /tmp/files/videos
-
cp /etc/[a-c]* /tmp/files/
-
mv /tmp/files/[a-b]* /tmp/files/photos/
mv /tmp/files/c* /tmp/files/videos/
-
find /etc/ -size -1000c -exec cp {} /tmp/files/pictures
-
ln -s /var/ /tmp/files/varlink
-
tar -cvJf /tmp/files/home.tar.xz /home
-J
for .xz compression
-
mkdir /tmp/arch/ ; tar -xvf /tmp/files/home.tar.xz -C /tmp/arch/
- note that we can use
Ctrl + a
to goto the start of the command line, and we can seperate commands using;
-
head -n 5 /etc/passwd | tail -n 1
-
sed -n 5p /etc/passwd
-
ps aux | awk '{ print $NF }'
-
grep -R root /etc/ 2> /dev/null | cut -f 1 -d : | less
-
grep -R '^...$' /etc/ 2> /dev/null |less
-
grep -R 'alex$' /etc/ 2> /dev/null
-
chvt 6
-
chvt 1
-
ssh root@localhost
-
- edit file
/etc/login.defs
and setPASS_MIN_LEN
to6
andPASS_MAX_DAYS
to90
- note that you can change defaults in
/etc/login.defs
and/etc/default/useradd
- edit file
-
touch /etc/skel/newfile
- note that files in
/etc/skel/
dir will be created in user home upon creation
-
- to add user
useradd username
- to add user
-
- to change password
passwd username
- to lock password
passwd -l username
- to change password
-
- to add group
groupadd name
- to add user to a group
usermod -aG gname uname
- to add group
-
vim /home/linda/.bash_profile
- add this line
umask 007
-
mkdir /data/profs /data/students
chmod 3770 /data/students
chmod 3770 /data/profs
chown anna:profs /data/profs
chown anna:students /data/students
setfacl -m d:g:profs:rx /data/students
- you can do that using one of these option
nmcli
and make sure thatbash-completion
is installednmtui
- you can edit existing connection and reactivate it or add and activate a new one
- or by editing config file
/etc/sysconfig/network-scripts/ifcfg-ens32
-
Ctrl+Z
to pause processbg
will move the most recent job to backgroundbg [job id]
will move the job to the backgroundfg
will move the most recent job to foreground
-
command &
will run the command in the background
-
jobs
to list running jobs
-
- some usefull commands in top
h
for helpr
for renicek
to kill processes
-
9
sig kill15
sig terminate
-
killall -15 dd
- install
psmisc
package if killall command not found
-
ls /etc/yum.repos.d
- you should see repos files there
-
yum search sepolicy
yum provides */sepolicy
for deeper search
-
yum module list
to list all versionsyum module install php:7.1
-
yumdownloader httpd
rpm -qp --scripts httpd-2.4....
-
systemctl enable httpd --now
-
- to list paramters
systemctl show httpd
- set
Restart
toalways
andRestartSec
to60
systemctl deamon-reload
to reload configrationssystemctl restart httpd
- to list paramters