RHCSA Ch2 Flashcards
After clicking ‘e’ in the boot loader, what do you type at the end of the ‘linux’ line to get into the emergency target
systemd.unit=emergency.target
After clicking ‘e’ in the boot loader, what do you type at the end of the ‘linux’ line to change root password?
rd.break
Root password change step 1
command to remount to sysroot
mount -o remount,rw /sysroot
No space between / and sysroot
Root password change step 2
Change root directory to sysroot
chroot /sysroot
Root password change step 3
Have SELinux rewrite the security context on all files on the next reboot
touch /.autorelabel
see default boot target
systemctl get-default
set different boot target
systemctl set-default graphical
systemctl set-default multi-user
Look at service unit files
systemctl list-unit-files -at service
- t shows all enabled
- a shows all
show list of enable running services
systemctl list-units -at service
Show unit file of a particular service
systemctl cat rsyslog
Disable a service from ever being able to start
systemctl mask atd
Note* atd is a service
manage time and date
timedatectl
Create a one time job.
at now +5min
at> type in command here then press ctrl D
what is the at service called
atq
List at jobs
atq
view a specific at job
at -c 1
1 = number of the job
cancel at job
atrm 1
What is a batch job?
create a batch job
Batch job is a job that will fun when the computer is not busy
> batch
at> command here then Ctrl-D
Where are user Cron Jobs stored?
/var/spool/cron/
Where are System Cron Jobs stored
/etc/cron.d
What is the format of the the following Cron tab?
45 23 * * 6 /home/grant/bin/backup.sh
45 23 * * 6 /home/grant/bin/backup.sh
min hr day Month day of week command
The star in the day/month - will run everyday/every month
hr = military time
List all of the cron.d directories - daily, hourly, weekly etc…
ls -d /etc/cron.*
What are the tree cron job man pages
man cron - covers the service itself
man crontab - explains crontab command usage
man 5 crontab - command format
Cron and at user access/deny files
/etc/at.deny /etc/cron.deny /etc/at.allow /etc/cron.allow see OneNote for user access table ~At and cron allow/deny table