RHCSA Ch2 Flashcards

1
Q

After clicking ‘e’ in the boot loader, what do you type at the end of the ‘linux’ line to get into the emergency target

A

systemd.unit=emergency.target

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

After clicking ‘e’ in the boot loader, what do you type at the end of the ‘linux’ line to change root password?

A

rd.break

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Root password change step 1

command to remount to sysroot

A

mount -o remount,rw /sysroot

No space between / and sysroot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Root password change step 2

Change root directory to sysroot

A

chroot /sysroot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Root password change step 3

Have SELinux rewrite the security context on all files on the next reboot

A

touch /.autorelabel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

see default boot target

A

systemctl get-default

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

set different boot target

A

systemctl set-default graphical

systemctl set-default multi-user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Look at service unit files

A

systemctl list-unit-files -at service

  • t shows all enabled
  • a shows all
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

show list of enable running services

A

systemctl list-units -at service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Show unit file of a particular service

A

systemctl cat rsyslog

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Disable a service from ever being able to start

A

systemctl mask atd

Note* atd is a service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

manage time and date

A

timedatectl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Create a one time job.

A

at now +5min

at> type in command here then press ctrl D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is the at service called

A

atq

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

List at jobs

A

atq

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

view a specific at job

A

at -c 1

1 = number of the job

17
Q

cancel at job

A

atrm 1

18
Q

What is a batch job?

create a batch job

A

Batch job is a job that will fun when the computer is not busy
> batch
at> command here then Ctrl-D

19
Q

Where are user Cron Jobs stored?

A

/var/spool/cron/

20
Q

Where are System Cron Jobs stored

A

/etc/cron.d

21
Q

What is the format of the the following Cron tab?

45 23 * * 6 /home/grant/bin/backup.sh

A

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

22
Q

List all of the cron.d directories - daily, hourly, weekly etc…

A

ls -d /etc/cron.*

23
Q

What are the tree cron job man pages

A

man cron - covers the service itself
man crontab - explains crontab command usage
man 5 crontab - command format

24
Q

Cron and at user access/deny files

A
/etc/at.deny
/etc/cron.deny
/etc/at.allow
/etc/cron.allow
see OneNote for user access table ~At and cron allow/deny table