0% found this document useful (0 votes)
176 views63 pages

Linux Command Line Basics

This document contains a summary of several Linux concepts and commands covered across multiple meetings or pertemuan. It includes questions about file permissions and ownership (chmod, chown), user and group management (useradd, groupadd, passwd), file system hierarchy (/etc, /home, /usr), redirection and pipes, and vi/vim navigation.

Uploaded by

Arruhu Nahya
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)
176 views63 pages

Linux Command Line Basics

This document contains a summary of several Linux concepts and commands covered across multiple meetings or pertemuan. It includes questions about file permissions and ownership (chmod, chown), user and group management (useradd, groupadd, passwd), file system hierarchy (/etc, /home, /usr), redirection and pipes, and vi/vim navigation.

Uploaded by

Arruhu Nahya
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/ 63

Pertemuan 1

1. Which Bash shortcut or command jumps to the beginning of the previous word on the command line? Pressing
Ctrl+LeftArrow
2. Which term describes an interface that provides a display for output and a keyboard for input to a shell session? Terminal
3. Which Bash shortcut or command to quickly complete commands or file names after they have typed enough at the prompt
to make it unique? TAB
4. Which command allows you to create single or multiple files, view the contents of files, concatenate the contents from
multiple files, and redirect contents of the file to a terminal or files? Cat
5. Which term describes the visual cue that indicates an interactive shell is waiting for the user to type a command? Prompt
6. Some of the many reasons to learn Linux include, except Linux is Less expensive
7. Text-based interface which can be used to input instructions to a computer system Command Line
8. Which Bash shortcut or command copies the last argument of previous commands? Pressing Esc+
9. Which Bash shortcut or command re-executes a specific command in the history list? !number
10. Which command that use to display the end of a file? Tail
11. Which command displays a list of previously executed commands prefixed with a command number? History
12. Which Bash shortcut or command separates commands on the same line? ;
13. Which command that use to display the beginning of a file? Head
14. Which two of the following are ways in which RedHat develops their products for the future and interacts with the
community? (Choose two.)
Sponsor and integrate open source projects into the community-driven Fedora project.
Participate in upstream projects.
15. Which character that is used for continuing a long command on another line in Linux \
16. What Makes Linux Great? All Statement true
17. Which command displays the type of file? File
18. Which command that use to change the password in Linux? Passwd
19. Which two of the following are benefits of open source software for the user? (Choose two.)

20. Which term describes the part of the command line that adjusts the behavior of a command? Option

Pertemuan 2
1. Which directory contains persistent, system-specific configuration data? /etc
2. Which directory is the top of the system's file system hierarchy? /
3. Which directory contains user home directories? /home
4. Which directory contains temporary files? /tmp
5. Which directory contains dynamic data, such as for databases and websites? /var
6. Which directory is the administrative superuser's home directory? /root
7. Which directory contains regular commands and utilities? /usr/bin
8. Which directory contains non-persistent process runtime data? /run
9. Which directory contains installed software programs and libraries? /usr
10. Which command is used to return to the current user's home directory, assuming the current working directory is /tmp and
their home directory is /home/user? cd
11. Which command displays the absolute path name of the current location? Pwd
12. Which command will always return you to the working directory used prior to the current working directory? Cd-
13. Which command will always change the working directory up two levels from the current location? Cd ../..
14. Which command lists files in the current location, using a long format, and including hidden files? ls-al
15. Which command will always change the working directory to /bin? Cd/bin
16. Which command will always change the working directory to the parent of the current location? Cd ..
17. Which command will change the working directory to /tmp if the current working directory is /home/student? cd ../../temp
Pertemuan 3
1. Which pattern will match only filenames ending with "b"? *b
2. Which pattern will match only filenames beginning with "b"? b*
3. Which pattern will match only filenames where the first character is not "b"? [!b]*
4. Which pattern will match all filenames containing a "b"? *b*
5. Which pattern will match only filenames that contain a number? *[[:digit:]]*
6. Which pattern will match only filenames that begin with an uppercase letter? [[:upper:]]*
7. Which pattern will match only filenames at least three characters in length? ???*

Pertemuan 4
1. Which answer displays output to a terminal and ignores all errors? 2>/dev/null
2. Which answer sends output to a file and sends errors to a different file? >file 2>file2
3. Which answer sends both output and errors to a file, creating it or overwriting its contents? &>file
4. Which answer sends output and errors to the same file ensuring existing file content is preserved? >>file 2>&1
5. Which answer discards all messages normally sent to the terminal? &>/dev/null
6. Which answer sends output to both the screen and a file at the same time? | tee file
7. Which answer saves output to a file and discards error messages? > file 2> /dev/null
8. Applications and sessions use export shell variables to determine their behavior true
9. Pipelines allow the output of a process to be manipulated and formatted by other processes before it is output to the
terminal. True
10. Which navigational keystrokes to save file and exit from vim editor? :wq
11. A shell variable that use to adjusts the preferred language for program output is ... LANG
12. Which navigational keystrokes to block selection in vim? Ctrl + v
13. Which command is used to list all shell variables that are currently set? Set
14. What output from the following command: DATA=10 echo DATA+5 DATA+5
15. Which navigational keystrokes to selected multiline in vim? Shift + V
16. Which navigational keystrokes to be in vim insert mode? I
17. Which command not included in output redirection operators? 1>
18. Shell variable names can contain uppercase or lowercase letters, digits, and special character (_,*,!) False
19. Which navigational keystrokes to exit from vim editor? :q
20. The key reason learns Vim instead of other text editor is Vim only text editor installed on a server. False

Pertemuan 5 – 6
1. Which command used to modify the group account?. Single choice. groupmod
2. Which item represents the program that provides the user's command-line prompt? login sheel
3. Which item or file represents the location of the user's personal files?. Single choice. home directory
4. Which item represents a number that identifies the group at the most fundamental level?. Single choice. GID
5. Which command used to modify the user account?. Single choice. usermod
6. Which item or file represents the location of the encrypted passwords local user account information?. Single choice.
/etc/shadow
7. UID ranges numbers for system users in red hat Linux is?. Single choice. 1-200
8. Which item or file represents the location of the local user account information?. Single choice. /etc/passwd
9. Which item or file represents the location of the local group information? /etc/group
10. Which command used to configure password age in Linux?. Single choice. chage
11. Which command usermod option to move user home directory?. Single choice. m
12. UID ranges numbers for system groups in red hat Linux is?. Single choice. 0 – 999
13. What is the fourth field of the /etc/group file?. Single choice. user list
14. Which command usermod option to Lock the user account? L
15. Which command used to delete user and user home directory?. Single choice. userdel -r
16. It is wise from the security standpoint to disable the user account from logging into the system when the user account serves
a responsibility that does not require the user to log into the system. True
17. What is the seventh field of the /etc/passwd file? default shell program
18. Which item represents a number that identifies the user at the most fundamental level?. Single choice. UID
19. What is the fourth field of the /etc/passwd file? GID
20. What is the fifth field of the /etc/passwd file? User real name
Pertemuan 7
1. Which file cannot be read by the operator2 user?. Single choice.
(5/5 Points)

file1
file2
file3
file4

2. Which files can be deleted by the operator2 user?. Single choice.

file1
file2
file1 dan file2
None of the Above

3. A user does a chmod operation on a file. Which of the following is true?. Single choice.
The last accessed time of the file is updated
The last modification time of the file is updated
The last change time of the file is updated
None of the mentioned

4. Sticky bit can be set using the following permission. Single choice.

chmod 0777 directory


chmod 2666 directory
chmod 4744 directory
chmod 1711 directory
5. Which command used to change file and directory permission?. Single choice.
chown
chmod
umask
masking

6. Which file has group ownership of staff1?. Single choice.

file1
file2
file3
file4
7. The permission -rwsr--r-- represented in octal expression will be. Single choice.

0777
2666
4744
4644

8. The permission -rwxr–r– represented in octal expression will be. Single choice.
777
666
744
711

9. The file permission 764 means:. Single choice.

Every one can read, group can execute only and the owner can read and write
Every one can read and write, but owner alone can execute
Every one can read, group including owner can write, owner alone can execute
Every one can read and write and execute
10. Which command used to change file permission for the user to read and execute?. Single choice.
chmod 500 file
chmod 700 file
chmod 400 file
chmod 200 file

11. Which command used to change file permission for the group to read and write?. Single choice.

chmod 500 file


chmod 760 file
chmod 450 file
chmod 210 file

12. Which command used to change file and directory ownership?. Single choice.

chown
chmod
filemod
datamod

13. Which command used to change the default file permission and clears all the group and other permissions of newly created
files. Single choice.
umask 007
umask 077
umask 707
umask 700

14. Which regular file is owned by operator1 and readable by all users?. Single choice.

file1
file2
file3
file4

15. Which command used to recursively change the ownership of an entire directory tree?. Single choice.
chown -R group2 directory
chown group2 directory
chown :group2 directory
chown -R :group2 directory

16. Which command used to add file permission for the other to read and execute?. Single choice.
chmod u+rx file
chmod o+rw file
chmod a+rx file
chmod o+rx file

17. The permission -rwSr--r-- represented in octal expression will be. Single choice.
0777
2666
4744
4644

18. Which files can be deleted by the operator1 user?. Multiple choice.

file1
file2
file3
file4

19. Which command used to add file permission for all to enable read?. Single choice.
chmod u+r file
chmod o+r file
chmod a+r file
chmod g+r file
20. Which file can be modified by the customer1 user?. Single choice.

file1
file2
file3
file4

Pertemuan 9
1. Which state represents a process that has been stopped or suspended?. Single choice.
S
D
T
R

2. Which state represents a process that is sleeping until some condition is met?. Single choice.
D
R
T
S

3. Which state represents a process that does not respond to signals and used only when process interruption may cause an
unpredictable device state?. Single choice.
S
T
R
D

4. Which state represents a process that used for kernel threads and accepts fatal signals?. Single choice.
K
D
I
T
5. Which state represents a process that has released all of its resources except its PID?. Single choice.
Z
T
D
S

6. Which process does a parent use to duplicate to create a new child process?. Single choice.
syscall
reap
exec
fork

7. A background job can be brought to the foreground by using the .... command with its job ID. Single choice.
bg
&
fg
%

8. You can make any command run in the background process by appending .... at the end of command. Single choice.
bg
&
%
fg

9. .... command used to send a signal to one or more processes that match selection criteria.. Single choice.
kill
pgrep
pkill
killall

10. The ..... command sends a signal to a process by PID number.. Single choice.
killall
kill
pgrep
pkill

11. .... command used to send a signal to one or more processes that match selection criteria.. Single choice.
pkill
killall
pgrep
kill

12. The .... command can signal multiple processes, based on their command name.. Single choice.
pkill
killall
pgrep
kill

13. The command that use to list user logins and currently running processes is .... Single choice.
ls
list
wc
w

14. Which of the following attribute is not shown by ps command?. Single choice.
PID
PPID
size
tty

15. Which command shows some attributes of a process?. Multiple choice.


PID
ps
PPID
top

16. The command that use to display the current load average and prints the current time, how long the machine has been up,
how many user sessions are running, and the current load average is ..... Single choice.
lscpu
wc
uptime
status

17. Which system call is used by the parent process to wait for the child process to complete?. Single choice.
exit
exec
wait
fork

18. Which navigational keystrokes to sorts process listing by memory usage, in descending order at top pages?. Single choice.
Shift+h
Shift+m
Shift+p
Shift+b

19. Which navigational keystrokes to sorts process listing by processor utilization, in descending order at top pages?. Single
choice.
Shift+b
Shift+p
Shift+m
Shift+h

20. Which navigational keystrokes to quit at top pages?. Single choice.


o
q
e
Esc

Pertemuan 9
1. Which state represents a process that has been stopped or suspended?. Single choice.
S
T
R
D

2. Which state represents a process that is sleeping until some condition is met?. Single choice.
D
T
R
S

3. Which state represents a process that does not respond to signals and used only when process interruption may cause an
unpredictable device state?. Single choice.
T
D
R
S

4. Which state represents a process that used for kernel threads and accepts fatal signals?. Single choice.
D
I
K
T

5. Which state represents a process that has released all of its resources except its PID?. Single choice.
D
Z
T
S

6. Which process does a parent use to duplicate to create a new child process?. Single choice.

exec
fork
syscall
reap

7. A background job can be brought to the foreground by using the .... command with its job ID. Single choice.
fg
%
&
bg

8. You can make any command run in the background process by appending .... at the end of command. Single choice.
fg
bg
&
%
9. .... command used to send a signal to one or more processes that match selection criteria.. Single choice.
kill
pkill
pgrep
killall
10. The ..... command sends a signal to a process by PID number.. Single choice.
kill
pkill
pgrep
killall

11. ... command used to send a signal to one or more processes that match selection criteria.. Single choice.
pgrep
pkill
killall
kill

12. The .... command can signal multiple processes, based on their command name.. Single choice.
kill
pkill
killall
pgrep

13. The command that use to list user logins and currently running processes is .... Single choice.
list
w
ls
wc

14. Which of the following attribute is not shown by ps command?. Single choice.
PID
PPID
tty
size

15. Which command shows some attributes of a process?. Multiple choice.


(5/5 Points)
PID
ps
PPID
top

16. The command that use to display the current load average and prints the current time, how long the machine has been up,
how many user sessions are running, and the current load average is ..... Single choice.
status
lscpu
uptime
wc

17. Which system call is used by the parent process to wait for the child process to complete?. Single choice.
fork
wait
exit
exec

18. Which navigational keystrokes to sorts process listing by memory usage, in descending order at top pages?. Single choice.
Shift+b
Shift+h
Shift+p
Shift+m

19. Which navigational keystrokes to sorts process listing by processor utilization, in descending order at top pages?. Single
choice.
Shift+m
Shift+p
Shift+h
Shift+b

20. Which navigational keystrokes to quit at top pages?. Single choice.

o
q
e
Esc

Pertemuan 10
1. If your SSH private key is protected with a passphrase, you can use ... to temporarily cache the passphrase in memory..
Single choice.
ssh-agent
ssh-add
ssh-keygen
ssh-cache

2. The command displays a list of users currently logged into the computer is .... Single choice.
ls
ssh --list
w
user-list

3. systemctl argument that is used to configure a service to start at boot time is .... Single choice.
enable
mask
disable
stop

4. If the client does not have a copy of the public key in its known host's files, the ssh command will ask you if you want to
log in anyway.. Single choice.
True
False

5. systemctl is-failed sshd.service command return ... if the unit was stopped.. Multiple choice.
failed
unknown
active
inactive

6. The command that copies the public key of the SSH keypair to the destination system is .... Single choice.
ssh-duplicate-id
ssh-paste-key
ssh-copy-id
ssh-copy-key

7. The OpenSSH server uses the ... parameter in the /etc/ssh/sshd_config configuration file to control whether users can use
password-based authentication to log in to the system.. Single choice.
Security
KeyAuthentication
AuthenticationPassword
PasswordAuthentication

8. The command displays a hierarchy mapping of dependencies to start the service unit is .... Single choice.
systemctl list-dependencies --all UNIT
systemctl dependencies UNIT
systemctl list-all-dependencies UNIT
systemctl list-dependencies UNIT

9. systemctl list-units option that use to filter service state is.... Single choice.
--state
--type
--status
--enable

10. Some of the risks of allowing direct login as root include:. Multiple choice.
The user name root exists on every Linux system by default, so a potential attacker only has to guess the
password, instead of a valid user name and password combination. This reduces complexity for an attacker.
The root user has unrestricted privileges, so its compromise can lead to maximum damage to the system.
Attackers cannot use password guessing attacks to remotely break into known accounts on the system.
From an auditing perspective, it can be hard to track which authorized user logged in as root and made
changes. If users have to log in as a regular user and switch to the root account, this generates a log event that can be
used to help provide accountability.

11. whenever you change the /etc/ssh/sshd_config file, you must restart the system for changes to take effect.. Single choice.
True
False

12. Units that are being used to delay the activation of service until a specific file system change occurs and commonly used for
services which use spool directories such as a printing. Single choice.
service unit
socket unit
path unit
system unit

13. You can configure an SSH server to allow you to authenticate without a password by using .... Single choice.
password-based authentication
key-based authentication
user-based authentication
login-based authentication

14. systemctl argument that is used to reload the configuration file of a running service is .... Single choice.
enable
mask
reload
restart
15. SSH private and public keys default file location are saved in .... Multiple choice.
~/.ssh/id_rsa
~/.ssh/user_rsa
~/.ssh/id_rsa.pub
~/.ssh/user_rsa.pub
16. In Red Hat Enterprise Linux, the first process that starts (PID 1) is .... Single choice.
systemd
systemctl
auditd
atd

17. systemctl argument that is used to prevents an administrator from accidentally starting a service that conflicts with others
is .... Single choice.
enable
mask
disable
stop

18. systemctl argument that is used to stop a service on a running system is .... Single choice.
enable
mask
disable
stop

Pertemuan 11
1. Fields of the system journal that can be used to search the path to the executable for the process is .... Single choice.
_FILE_PATH
_LOCATION
_PATH
_EXE

2. Code 3 in syslog protocol priority means?. Single choice.


Critical condition
System is unusable
Non-critical error condition
Warning condition

3. Command used to retrieve log messages from the journal is ... Single choice.
journal
journallist
journalctl
journal -a

4. Which file stores syslog messages related to the mail server?. Single choice.
/var/log/lastlog
/var/log/maillog
/var/log/tallylog
/var/log/boot.log

5. The command that can send messages to the rsyslog service is .... Single choice.
logsend
logger
sendlog
translog

6. Code 2 in syslog protocol priority means?. Single choice.


Critical condition
System is unusable
Non-critical error condition
Warning condition

7. How many standard priorities in syslog protocol ?. Single choice.


5
6
7
8

8. Which service sorts and organizes syslog messages into files in /var/log?. Single choice.
rsyslog
systemd-journald
auditd
tuned

9. Fields of the system journal that can be used to search the systemd unit that started the process is .... Single choice.
_SYSTEMD
_SYSTEMD_UNIT
_SYSTEM_UNIT
_SYSTEMD_ID

10. The third field from anatomy of a log message in the /var/log/secure log file contains information about .... Single choice.
The actual message sent
The time stamp when the log entry was recorded
The host from which the log message was sent
The program or process name and PID number that sent the log message

11. Which of these log files stores most syslog messages, with the exception of those that are related to authentication, mail,
scheduled jobs, and debugging?. Single choice.
(5/5 Points)
/var/log/maillog
/var/log/boot.log
/var/log/messages
/var/log/secure

12. Which storage type in system journals using if the /var/log/journal directory exists?. Single choice.
persistent
volatile
auto
temporary

13. Which log file stores syslog messages related to security and authentication operations in the system?. Single choice.
/var/log/maillog
/var/log/boot.log
/var/log/messages
/var/log/secure

14. Which file stores syslog messages related to the scheduled jobs?. Single choice.
/var/log/cron
/var/log/tallylog
/var/log/spooler
/var/log/secure

15. The second field from anatomy of a log message in the /var/log/secure log file contains information about .... Single choice.
The actual message sent
The time stamp when the log entry was recorded
The host from which the log message was sent
The program or process name and PID number that sent the log message
Correct answers: The host from which the log message was sent

16. What file stores console messages related to system startup?. Single choice.
/var/log/cron
/var/log/boot.log
/var/log/spooler
/var/log/secure

17. The configuration file location for chronyd service is .... Single choice.
/var/chrony.conf
/usr/chrony.conf
/etc/chrony.conf
/tmp/chrony.conf

18. The Storage parameter in system journals are .... Multiple choice.
persistent
volatile
auto
temporary

19. Which directory accommodates the human-readable syslog files?. Single choice.
/sys/kernel/debug
/var/log/journal
/run/log/journal
/var/log

20. A tool to keep log files from taking up too much space in the file system containing the /var/log directory is .... Single
choice.
logsec
logext
logrotate
logrot

Pertemuan 12
1. After manual editing connection configuration files, you need to restart the system so that NetworkManager reads the
configuration changes.. Single choice.
False
True
2. Regular users that log in using ssh do not have access to change network permissions without becoming root.. Single
choice.
True
False

3. What command displays the status of all network devices in RedHat Linux?. Single choice.
nmcli status
nmcli dev status
nmcli dev show status
nmcli status dev

4. Which term determines how many leading bits in the IP address contribute to its network address?. Single choice.
multicast
netaddr
netmask
subnet

5. NAME=ens3 in Network Configuration Files use to configure?. Single choice.


Name of the connection
The connection is bound to the network interface with this name
Automatically activate the connection with the name ens3
Name of the domain network

6. What command for displaying performance statistics in RedHat Linux?. Single choice.
ip -s display enX
ip -s link enX
ip -s link show enX
ip show enX

7. What command used to disconnects the network interface device and brought it down in RedHat Linux?. Multiple choice.
nmcli dev down
nmcli dev disconnect
nmcli dev dis
nmcli down

8. What command for display UDP socket statistics in RedHat Linux?. Single choice.
ss -u
ss -a
ss -l
ss -t

9. Which number is the size, in bits, of an IPv6 address?. Single choice.


64
16
128
32

10. What command used to test DNS server connectivity in RedHat Linux?. Single choice.
host
hostname
hostnamectl
hostctl

11. Which address represents a valid IPv4 host IP address?. Single choice.
192.168.1.0
192.168.1.188
192.168.1.256
192.168.1.255

12. What command for display only listening sockets in RedHat Linux?. Single choice.
ss -u
ss -a
ss -l
ss -t

13. Which address does not represent a valid IPv6 address?. Single choice.
ff02::1:0:0
2000::1
2001:db8::7::2
2001:3::7:0:2

14. Which term allows one system to send traffic to a special IP address that is received by multiple systems?. Single choice.
netaddr
multicast
netmask
subnet

15. Which number is the size, in bits, of an IPv4 address?. Single choice.
32
8
64
16

16. What command for tracing routes taken by traffic in RedHat Linux?. Multiple choice.
route
trace
tracepath
traceroute

17. What command used to add new network connections in RedHat Linux?. Single choice.
nmcli add
nmcli add con
nmcli con add
nmcli dev add

18. BOOTPROTO=none in Network Configuration Files use to config static IP addresses.. Single choice.
True
False

19. What command for display TCP socket statistics in RedHat Linux?. Single choice.
ss -a
ss -l
ss -t
ss -u

20. What command used to modify /etc/hostname file?. Single choice.


hostname
hostctl
hostnamectl
host

Pertemuan 13

1. The command that use to secure copies files from a remote system to the local system or from the local system to a remote
system and implement an algorithm that minimizes the amount of data copied by synchronizing only the changed portions
of files is .... Single choice.
sftp
rsync
scp
mv

2. Tar option for using xz compression is .... Single choice.


J
j
Z
z

3. Tar option for extracting files from an existing archive is .... Single choice.
c
x
t
n

4. The command that use to interactively upload or download files from an SSH server is.... Single choice.
sftp
rsync
scp
mv

5. rsync option use to performance dry run is .... Single choice.


p
D
n
l

6. Tar option for using bzip2 compression is .... Single choice.


J
j
Z
z

7. The command that use to secure copies files from a remote system to the local system or from the local system to a remote
system is .... Single choice.
sftp
rsync
scp
mv
8. Tar option for listing the table of contents of an archive is .... Single choice.
c
x
t
n

9. Tar option for creating a new archive is .... Single choice.


c
x
t
n

10. Tar option for using gzip compression is .... Single choice.
J
j
Z
z

Pertemuan 14
1. Command used to view all available repositories is .... Single choice.
yum repolist all
yum-config-manager
yum list all
yum repo all

2. Command to list installed and available packages by name is .... Single choice.
yum [NAME-PATTERN]
yum packagelist [NAME-PATTERN]
yum list [NAME-PATTERN]
yum -l [NAME-PATTERN]

3. Command used to search for a package by keyword is .... Single choice.


yum search KEYWORD
yum KEYWORD
yum -s KEYWORD
yum search_package KEYWORD
4. There are basic tasks performed with Red Hat Subscription Management tools:. Multiple choice.
Register
Create
Subscribe
Enable respositories

5. Command used to reset the module stream is .... Single choice.


yum reset module
yum reset
yum module reset
reset module

6. Command used to enable or disable repositories is .... Single choice.


yum repolist
yum-config-manager
yum install
yum enable

7. Command used to update all packages is .... Single choice.


yum repolist
yum-config-manager
yum install
yum update

8. Command to list documentation files included in a RPM package is .... Single choice.
rpm -ld NAME
rpm -d NAME
rpm -ql NAME
rpm -qd NAME

9. Command to list all files included in a RPM package is .... Single choice.
rpm -ld NAME
rpm -d NAME
rpm -ql NAME
rpm -qd NAME

10. Which GUI tool is used to register and subscribe a system?. Single choice.
PackageKit
gpk-application
gnome-software
Red Hat Subscription Manager

11. Command used to remove an installed module is .... Single choice.


yum remove module
yum delete module
yum module remove
reset module delete

12. Command to list all RPM packages currently installed is .... Single choice.
rpm -qa
rpm -q
rpm -ql
rpm -qd

13. Red Hat Enterprise Linux 8 content is distributed through these software repositories:. Multiple choice.

BaseOS
PackageStream
BaseApp
AppStream

14. rpm is not designed to work with package repositories or resolve dependencies from multiple sources automatically.. Single
choice.
True
False

15. These are several different ways to register a system with Red Hat Customer Portal, except.... Single choice.
Graphical interface that you can access with a GNOME application
Mobile Service
Web Console service
Command-line

16. RPM package files names consist of ... elements. Single choice.
two
three
four
five
17. Where the location of entitlement certificates being stored?. Single choice.
/etc/pki/product
/etc/pki/consumer
/etc/pki/entitlement
/etc/pki

Pertemuan 15

1. Command to identify which processes currently prevent the file system from successful
unmounting is .... Single choice.
lsof
ls
lsDev
lsblk

2. Choose the correct name of the device file for the third partition on the second virtio-blk disk
attached to a virtual machine?. Single choice.
/dev/vda3
/dev/vdb3
/dev/sdb2
/dev/sdb3

3. The -type option in the find command limits the search scope for directory is.... Single choice.
f
d
l
b

4. The command to add the cockpit service to firewalld to open port 9090 in the firewall is....
Single choice.
sudo firewall-cmd --add-service=cockpit --permanent;sudo firewall-cmd --reload
sudo firewall-cmd --add-service=cockpit;sudo firewall-cmd --reload
sudo firewall --add-service=cockpit --permanent;sudo firewall --reload
firewall-cmd --add=cockpit --permanent;sudo firewall-cmd –reload

5. The command to enable and start the cockpit.socket service is.... Single choice.
sudo systemctl enable cockpit.socket
sudo systemctl enable --now cockpit
sudo systemctl enable --now cockpit.socket
sudo systemctl enable --now cockpit.service

6. Command used to manually mount a file system is .... Single choice.


mounted
mounting
mount
umount

7. The common ways to specify the file system on a disk partition to be mounted in the file
system are by using.... Multiple choice.
UID
name of the device file in /dev
UUID
dev file

8. What is the name of the device file for the entire second virtio-blk disk attached to a virtual
machine?. Single choice.
/dev/sda2
/dev/vdb
/dev/sda
/dev/vda

9. The -type option in the find command limits the search scope for regular file is.... Single
choice.
f
d
l
b

10. The -type option in the find command limits the search scope for block device is....
Single choice.
f
d
l
b

11. Command used to list the details of a specified block device or all the available devices
is .... Single choice.
listDev
lsblk
lsDev
listblk

12. commands that can be used to search for files in the file-system hierarchy is .... Multiple
choice.
search
trace
locate
find

13. You can start, enable, disable, and stop services with graphical tools in Web Console..
Single choice.
True
False

14. Choose the device file name of the third partition on the second SATA hard drive.. Single
choice.
/dev/sda3
/dev/vda2
/dev/sdb2
/dev/sdb3

15. What is the name of the device file of an entire SATA hard drive in the /dev directory?.
Single choice.
/dev/sda1
/dev/vda
/dev/sda
/dev/vda1

16. Which command provides an overview of the file system mount points and the amount
of free space available in SI units?. Single choice.
df
df -H
df -h
du -h

17. Web Console allows you to start the system remotely.. Single choice.
True
False

18. You can do this thing in Customer Portal, except .... Single choice.
Access official product documentation
Obtain software downloads, updates, and evaluations
Troubleshoot software problem
Submit and manage support tickets

Pretest

1. Only filenames that contain a number


*[[:digit:]]*

[[:digit:]]

*[[digit]]*

[[*digit*]]

2. (P2) Only filenames ending in "b"


*b
b*
*b*
b/

3. (P2) Move up to the parent of the current location.


cd
cd -
cd ..
cd bin

4. (P10) The log file for security and authenticationrelated messages and errors
/var/log/boot.log
/var/log
/var/log/secure
/var/log/maillog

5. (P13) Provide software packages


review and track
register
enable repositories
subscribe

6. (P11) The following picture means

name resolution is not configured


this configuration is feasible
gateway is not on the same subnet
invalid IPv4 address

7. (P15) Multiple system hardware providing virtualized redundancy


RHEL OpenStack platform
Red Hat Enterprise Linux
Red Hat Enterprise Virtualization
OpenStack in public cloud
8. (P5) The fourth field of /etc/passwd
primary group
home directory
login shell
UID

9. (P4) Send command output to file; errors to different file


>file 2>file2
2>/dev/null
> file 2> /dev/null
&>file

10. (P1) The name of a program to run


Prompt
Command
Option
Argument

11. (P2) This directory contains static, persistent system configuration data
/home
/root
/var
/etc

12. (P15) Immediately stop a virtual machine, similar to unplugging it


shutdown
undefine
define
destroy

13. (P2) Return to the most previous working directory


cd -
cd ../..
cd bin
cd ..

14. (P2) Contains installed software programs and libraries


/usr
/usr/bin
/usr/sbin
/run

15. (P7) Process is running or waiting to run on a CPU


R
S
D
T

16. (P14) The device file of the second disk in a virtual machine in /dev
/dev/vdb
/dev/sdb3
/dev/vdb3
/dev/sdc

17. (P13) Enable a system to use selected Red Hat products


register
enable repositories
register
subscribe

18. (P2) Regular user commands and utilities are located here
/usr/bin
/usr/sbin
/etc
/usr

19. (P15) Management utility for standalone KVM hosts


virt-manager
Red Hat Enterprise Linux
RHEV-M
CloudForms

20. (P2) Only filenames where first character is not "b"


[!b]*
[b!]
[[b]]
[:b:]

21. (P1) The part of the command line that specifies the target that the command should operate on
Virtual console
Terminal
Option
Argument

22. (P11) The following picture means

IP address cannot be a network address


this configuration is feasible
gateway is not on the same subnet
invalid IPv4 address

23. (P5) A number that identifies the group at the most fundamental level
UID
login shell
GID
primary group

24. (P4) Run command, save output in a file, discard error messages
| tee file
> file 2> /dev/null
&>file
>file 2>file2

25. (P1) The part of the command line that adjusts the behavior of a command
Option
Argument
Physical console
Command

26. (P4) Display command output to terminal ignore all errors


&>/dev/null
2>/dev/null
> file 2> /dev/null
>>file 2>&1

27. (P13) Determine the number of available subscriptions


subscribe
review and track
register
enable repositories

28. (P13) A collection of RPM packages and package groups


Version
Release
Changelog
Repository

29. (P7) Process has released all its resources except its PID
S
T
R
Z

30. (P1) Copy the last argument of previous commands


Esc+.
Esc+"
Esc+/
Esc+*

31. (P14) The device file of the second partition on the first SATA hard drive in /dev
/dev/vdb
/dev/vdb3
/dev/sda2
/dev/sdc

32. (P10) The directory to which rsyslog is writing all the log files
/var/log/cron
/var/log
/var/log/cron
/var/log/boot.log

33. (P10) The log file related to periodically executed tasks


/var/log/cron
/var/log
/var/log/secure
/var/log/tasks

34. (P4) Run command, save output in a file, discard error messages
| tee file
> file 2> /dev/null
&>file
>file 2>file2

35. (P2) Only filenames at least 3 characters in length


*3*
???*
[???]
***

36. (P15) Management utility for multiple host virtualization platform


RHEV-M
RHEL OpenStack platfoem
Red Hat Enterprise Virtualization
OpenStack in public cloud

37. (P11) The following picture means


name resolution is not configured
this configuration is feasible
gateway is not on the same subnet
invalid IPv4 address

38. (P7) Process is waiting for I/O or some condition to be met and must not respond to signals
Z
D
T
R

39. (P1) The hardware display and keyboard used to interact with a system
Option
Virtual console
Physical console
Prompt

40. (P2) Temporary files are stored here


/var
/usr/bin
/tmp
/etc

41. (P4) Run a command but throw away all possible terminal displays
&>/dev/null
2>/dev/null
> file 2> /dev/null
&>/dev/null

42. (P5) The program that provides the user's command line prompt
login shell
user login
shell fields
user fields

43. (P5) Location of local group information


/etc/passwd
/etc/group
/etc/info
/etc/groupinfo

44. (P2) Return to the current user's home directory


cd
pwd
cd ..
cd bin

45. (P2) Only filenames beginning with "b"


*b
*b*
b*
/b

46. (P13) A collection of RPM packages and package groups


Version
Release
Changelog
Repository

47. (P6 pic) Contents may be modified by the user betty

rfile1
rfile2
lfile1
lfile2

48. (P14) The device file of a logical volume in /dev


/dev/sdc_home/lv_install
/dev/vg_install/lv_home
/dev/sda_install/vg_home
/dev/vg_home/sdc_install

49. (P2) List the current user's home directory (long format) in simplest syntax, when it is not the current location
ls -l ~
cd
pwd
ls -al

50. (P1) Clear from the cursor to the end of the command line
Ctrl+m
Ctrl+k
Ctrl+del
Ctrl+a

51. (P1) One of multiple logical consoles that can each support an independent login session
Virtual console
Command
Virtual console
Shell
52. (P1) Display the list of previous commands
history
previous
Esc+Left Arrow
Esc+Up Arrow

53. (P2) Move up two levels from the current location


cd ../..
cd bin
cd -
cd
54. (P1) Jump to the beginning of the previous word on the command line
Ctrl+k
!string
Ctrl+Left Arrow
Ctrl+Right Arrow

55. (P15) Management utility for standalone KVM hosts


virt-manager
Red Hat Enterprise Linux
RHEV-M
CloudForms

56. (P6 pic) Can be deleted by the user barney

rfile1
rfile2
all
none

57. (P13) List of reasons for each package build


Changelog
Release
Version
Repository

58. (P6 pic) Cannot be read by the user barney


rfile1
rfile2
lfile1
lfile2

59. (P10) The log file with mail server-related messages


/var/log/maillog
/var/log/messages
/var/log
/var/log/cron

60. (P2) Contains installed software programs and libraries


/usr
/usr/bin
/usr/sbin
/run
61. (P2) Move up two levels from the current location
cd ../..
cd bin
cd -
cd

62. (P2) Move to the binaries location from any current location
cd
cd -
cd ..
cd /bin

63. (P15) Multiple system hardware providing virtualized redundancy


RHEL OpenStack platform
Red Hat Enterprise Linux
Red Hat Enterprise Virtualization
OpenStack in public cloud

64. (P13) Attach a system to a Red Hat account


register
subscribe
review and track
enable repositories

65. (P2) Temporary files are stored here


/var
/usr/bin
/tmp
/etc
66. (P10) Most syslog messages are logged here. The exceptions are messages related to authentication, email processing, and
that periodically run jobs, or those which are purely debugging-related
/var/log/secure
/var/log
/var/log/cron
/var/log/messages

67. (P1) The visual cue that indicates an interactive shell is waiting for the user to type a command
Shell
Prompt
Command
Option

68. (P10) The log file with mail server-related messages


/var/log/maillog
/var/log/messages
/var/log
/var/log/cron

69. (P15) Use an XML configuration to create and boot a virtual machine
start
define
reboot
create

70. (P2) Contains dynamic, non-persistent application runtime data


/tmp
/var
/run
/root

71. (P15) Use an XML configuration to create a virtual machine


undefine
define
start
create

72. (P13) The version of the package build


GPG signature
Release
Changelog
Architecture

73. (P2) User home directories are located under this directory
/home
/etc
/tmp
/usr/bin

74. (P1) Jump to the beginning of the previous word on the command line
Ctrl+k
!string
Ctrl+Left Arrow
Ctrl+Right Arrow
75. (P11) The following picture means
this configuration is feasible
IP address cannot be a network address
gateway is not on the same subnet
name resolution is not configured

76. (P15) Management utility for multiple host virtualization platform


RHEV-M
RHEL OpenStack platfoem
Red Hat Enterprise Virtualization
OpenStack in public cloud

77. (P1) Re-execute a recent command by matching the command name


!string
!number
Tab
Ctrl+z

78. (P14) The device file of a SATA hard drive residing in /dev
/dev/vdb
/dev/sda
/dev/sdb
/dev/sdc

79. (P14) The device file of the third partition on the second disk in a virtual machine in /dev
/dev/vdb
/dev/sda2
/dev/sdc
/dev/vdb3

80. (P5) The program that provides the user's command line prompt
login shell
user login
shell fields
user fields

81. (P14) The device file of the second partition on the first SATA hard drive in /dev
/dev/vdb
/dev/vdb3
/dev/sda2
/dev/sdc

82. (P2) Move up to the parent of the current location


cd
cd -
cd ..
cd bin

83. (P4) Send output and errors to the same new, empty file
&>file
&>/dev/null
| tee file
>>file 2>&1

84. (P13) The upstream source code version


Repository
Architecture
GPG signature
Version

85. (P2) This is the root account's home directory


/tmp
/run
/usr
/root
86. (P2) List the current location (long format) with hidden files
ls -al
ls -l
ls -l ~
ls -al ~
87. (P11) The following picture means
name resolution is not configured
gateway is not on the same subnet
IP address cannot be a network address
this configuration is feasible

88. (P5) A number that identifies the group at the most fundamental level
UID
login shell
GID
primary group

89. (P1) The hardware display and keyboard used to interact with a system
Option
Virtual console
Physical console
Prompt

90. (P4) Run a command but throw away all possible terminal displays
&>/dev/null
2>/dev/null
file 2> /dev/null
&>/dev/null

Quiz dari website Redhat


1. Which item represents a number that identifies the user at the most fundamental level?

A.primary user

B.UID *

C.GID
D.username

2. Which item represents the program that provides the user's command-line prompt?

A.primary shell

B.home directory

C.login shell *

D.command name

3. Which item or file represents the location of the local group information?

A.home directory

B./etc/passwd

C./etc/GID

D./etc/group *

4. Which item or file represents the location of the user's personal files?

A.home directory *

B.login shell

C./etc/passwd

D./etc/group

5. Which item represents a number that identifies the group at the most fundamental level?

A.primary group

B.UID

C.GID *

D.groupid

6. Which item or file represents the location of the local user account information?

A.home directory

B./etc/passwd *

C./etc/UID

D./etc/group
7. What is the fourth field of the /etc/passwd file?

A.home directory

B.UID

C.login shell

D.primary group *

8. Which regular file is owned by operator1 and readable by all users?

A.lfile1

B.lfile2

C.rfile1 *

D.rfile2

9. Which file can be modified by the contractor1 user?

A.lfile1

B.lfile2 *

C.rfile1

D.rfile2

10. Which file cannot be read by the operator2 user?

A.lfile1

B.lfile2

C.rfile1

D.rfile2 *

11. Which file has a group ownership of consultant1?

A.lfile1 *

B.lfile2

C.rfile1

D.rfile2

12. Which files can be deleted by the operator1 user?

A.rfile1
B.rfile2

C.All of the above. *

D.None of the above.

13. Which files can be deleted by the operator2 user?

A.lfile1

B.lfile2

C.All of the above.

D.None of the above. *

14. Which state represents a process that has been stopped or suspended?

A.D

B.R

C.S

D.T *

E.Z

15. Which state represents a process that has released all of its resources except its PID?

A.D

B.R

C.S

D.T

E.Z *

16. Which process does a parent use to duplicate to create a new child process?

A.exec

B.fork *

C.zombie

D.syscall

E.reap

17. Which state represents a process that is sleeping until some condition is met?

A.D
B.R

C.S *

D.T

E.Z

18. Which of these log files stores most syslog messages, with the exception of those that are related to authentication, mail,
scheduled jobs, and debugging?

A./var/log/maillog

B./var/log/boot.log

C./var/log/messages *

D./var/log/secure

19. Which log file stores syslog messages related to security and authentication operations in the system?

A./var/log/maillog

B./var/log/boot.log

C./var/log/messages

D./var/log/secure *

20. Which service sorts and organizes syslog messages into files in /var/log?

A.rsyslog *

B.systemd-journald

C.auditd

D.tuned

21. Which directory accommodates the human-readable syslog files?

A./sys/kernel/debug

B./var/log/journal

C./run/log/journal

D./var/log *

22. Which file stores syslog messages related to the mail server?

A./var/log/lastlog

B./var/log/maillog *
C./var/log/tallylog

D./var/log/boot.log

23. Which file stores syslog messages related to the scheduled jobs?

A./var/log/cron *

B./var/log/tallylog

C./var/log/spooler

D./var/log/secure

24. What file stores console messages related to system startup?

A./var/log/messages

B./var/log/cron

C./var/log/boot.log *

D./var/log/secure

25. Which number is the size, in bits, of an IPv4 address?

A.4

B.8

C.16

D.32 *

E.64

F.128

26. Which term determines how many leading bits in the IP address contribute to its network address?

A.netscope

B.netmask *

C.subnet

D.multicast

E.netaddr

F.network

27. Which address represents a valid IPv4 host IP address?


A.192.168.1.188 *

B.192.168.1.0

C.192.168.1.255

D.192.168.1.256

28. Which number is the size, in bits, of an IPv6 address?

A.4

B.8

C.16

D.32

E.64

F.128 *

29. Which address does not represent a valid IPv6 address?

A.2000:0000:0000:0000:0000:0000:0000:0001

B.2::1

C.::

D.ff02::1:0:0

E.2001:3::7:0:2

F.2001:db8::7::2 *

G.2000::1

30. Which term allows one system to send traffic to a special IP address that is received by multiple systems?

A.netscope

B.netmask

C.subnet

D.multicast *

E.netaddr

F.network
31. Which command is used to register a system without using a graphical environment?

A.rct

B.subscription-manager *

C.rpm

D.yum

32. Which GUI tool is used to register and subscribe a system?

A.PackageKit

B.gpk-application

C.Red Hat Subscription Manager *

D.gnome-software

33. Which task(s) can be performed with Red Hat Subscription Management tools?

A.Register a system.

B.Subscribe a system.

C.Enable repositories.

D.Review and track entitlements.

E.All of the above *

34. What is the name of the device file of an entire SATA hard drive in the /dev directory?

A./dev/vda

B./dev/sda1

C./dev/sda *

D./dev/vg_install/lv_home

35. Choose the device file name of the third partition on the second SATA hard drive.

A./dev/vda2

B./dev/sda3

C./dev/sdb2

D./dev/sdb3 *

36. What is the name of the device file for the entire second virtio-blk disk attached to a virtual machine?

A./dev/vda2
B./dev/sda2

C./dev/vdb2

D./dev/vdb *

37. Choose the correct name of the device file for the third partition on the second virtio-blk disk attached to a virtual machine?

A./dev/vda3

B./dev/sda3

C./dev/vdb3 *

D./dev/vda3

38. Which command provides an overview of the file system mount points and the amount of free space available in SI units?

A.df

B.df -H *

C.df -h

D.du -h
.
39. In what order do the following events occur when managing a Red Hat Enterprise Linux system using Red Hat Insights?
 Red Hat Insights analyzes system metadata to determine which issues and recommendations apply.
 The Insights client uploads system metadata to the Red Hat Insights service.
 The administrator views the recommended actions in the Red Hat Insights customer portal.
 Red Hat Insights collects system metadata on the Red Hat Enterprise Linux system.

A.1, 2, 3, 4

B.4, 2, 1, 3 *

C.4, 2, 3, 1

D.4, 1, 2, 3

40. Which command is used to register a client to Red Hat Insights?

A.insights-client --register *

B.insights-client --no-upload

C.subscription-manager register

D.insights-client --unregister

41. Which two pages in the Red Hat Insights console allows you to display list of rules, using filters based on the catgeory of
risk? (Choose two.)

A.Overview *
B.Inventory

C.Rules *

D.Remediation

Quiz 16 dari web Redhat

[student@workstation ~]$ lab users-review start


From workstation, open an SSH session to serverb as student.
[student@workstation ~]$ ssh student@serverb
...output omitted...
[student@serverb ~]$
On serverb, ensure that newly created users have passwords that must be changed every 30 days.
1. Set PASS_MAX_DAYS to 30 in /etc/login.defs. Use administrative rights while opening the file with the
text editor. You can use the sudo vim /etc/login.defs command to perform this step. Use student as the password
when sudo prompts you to enter the student user's password.
2. ...output omitted...
3. # Password aging controls:
4. #
5. # PASS_MAX_DAYS Maximum number of days a password may be
6. # used.
7. # PASS_MIN_DAYS Minimum number of days allowed between
8. # password changes.
9. # PASS_MIN_LEN Minimum acceptable password length.
10. # PASS_WARN_AGE Number of days warning given before a
11. # password expires.
12. #
13. PASS_MAX_DAYS 30
14. PASS_MIN_DAYS 0
15. PASS_MIN_LEN 5
16. PASS_WARN_AGE 7

...output omitted...

Create the new group called consultants with a GID of 35000.


[student@serverb ~]$ sudo groupadd -g 35000 consultants

Configure administrative rights for all members of consultants to be able to execute any command as any user.
17. Create the new file /etc/sudoers.d/consultants and add the following content to it. You can use the sudo vim
/etc/sudoers.d/consultants command to perform this step.
%consultants ALL=(ALL) ALL
2.
Create the consultant1, consultant2, and consultant3 users with consultants as their supplementary group.
3. [student@serverb ~]$ sudo useradd -G consultants consultant1
4. [student@serverb ~]$ sudo useradd -G consultants consultant2

[student@serverb ~]$ sudo useradd -G consultants consultant3


5.
Set the consultant1, consultant2, and consultant3 accounts to expire in 90 days from the current day.
1. Determine the date 90 days in the future. You may get a different value as compared to the following output
based on the current date and time of your system.
2. [student@serverb ~]$ date -d "+90 days" +%F

2019-04-28
3. Set the account expiry date of the consultant1, consultant2, and consultant3 accounts to the same value as
determined in the preceding step.
4. [student@serverb ~]$ sudo chage -E 2019-04-28 consultant1
5. [student@serverb ~]$ sudo chage -E 2019-04-28 consultant2

[student@serverb ~]$ sudo chage -E 2019-04-28 consultant3


6.
Change the password policy for the consultant2 account to require a new password every 15 days.
[student@serverb ~]$ sudo chage -M 15 consultant2
7. Additionally, force the consultant1, consultant2, and consultant3 users to change their passwords on the first login.
1. Set the last day of the password change to 0 so that the users are forced to change the password whenever
they log in to the system for the first time.
2. [student@serverb ~]$ sudo chage -d 0 consultant1
3. [student@serverb ~]$ sudo chage -d 0 consultant2

[student@serverb ~]$ sudo chage -d 0 consultant3


4. Log off from serverb.
5. [student@serverb ~]$ exit
6. logout

Connection to serverb closed.


Evaluation
On workstation, run the lab users-review grade command to confirm success of this exercise.
[student@workstation ~]$ lab users-review grade
Finish
On workstation, run lab users-review finish to complete this lab. This script deletes the user accounts and files created
throughout the lab to ensure that the environment is clean.

Summary
In this chapter, you learned:
 There are three main types of user account: the superuser, system users, and regular users.
 A user must have a primary group and may be a member of one or more supplementary groups.
 The three critical files containing user and group information are /etc/passwd, /etc/group, and /etc/shadow.
 The su and sudo commands can be used to run commands as the superuser.
 The useradd, usermod, and userdel commands can be used to manage users.
 The groupadd, groupmod, and groupdel commands can be used to manage groups.
 The chage command can be used to configure and view password expiration settings for users.

[student@workstation ~]$ lab perms-review start


Use the ssh command to log in to serverb as the student user. Switch to root on serverb using redhat as the password.
[student@workstation ~]$ ssh student@serverb
...output omitted...
[student@serverb ~]$ su -
Password: redhat
[root@serverb ~]#
1. Create a directory called /home/techdocs.
1. Use the mkdir command to create a directory called /home/techdocs.
[root@serverb ~]# mkdir /home/techdocs
1. Change the group ownership of the /home/techdocs directory to the techdocs group.
1. Use the chown command to change the group ownership for the /home/techdocs directory to
the techdocs group.
[root@serverb ~]# chown :techdocs /home/techdocs
Verify that users in the techdocs group can create and edit files in the /home/techdocs directory.
1. Use the su command to switch to the tech1 user.
2. [root@serverb ~]# su - tech1

[tech1@serverb ~]$
3. Use touch to create a file named techdoc1.txt in the /home/techdocs directory.
4. [tech1@serverb ~]$ touch /home/techdocs/techdoc1.txt

touch: cannot touch '/home/techdocs/techdoc1.txt': Permission denied

Note
Note that even though the /home/techdocs directory is owned by techdocs and tech1 is part of the techdocs group, it is not
possible to create a new file in that directory. This is because the techdocs group does not have write permission. Use the ls
-ld command to show the permissions.
[tech1@serverb ~]$ ls -ld /home/techdocs/
drwxr-xr-x. 2 root techdocs 6 Feb 5 16:05 /home/techdocs/
Set permissions on the /home/techdocs directory. On the /home/techdocs directory, configure setgid (2), read/write/execute
permissions (7) for the owner/user and group, and no permissions (0) for other users.
1. Exit from the tech1 user shell.
2. [tech1@serverb ~]$ exit
3. logout

[root@serverb ~]#
4. Use the chmod command to set the group permission for the /home/techdocs directory. On
the /home/techdocs directory, configure setgid (2), read/write/execute permissions (7) for the owner/user and group, and no
permissions (0) for other users.
[root@serverb ~]# chmod 2770 /home/techdocs
1. Verify that the permissions are set properly.
2. [root@serverb ~]# ls -ld /home/techdocs

drwxrws---. 2 root techdocs 6 Feb 4 18:12 /home/techdocs/


Note that the techdocs group now has write permission.
Confirm that users in the techdocs group can now create and edit files in the /home/techdocs directory. Users not in
the techdocs group cannot edit or create files in the /home/techdocs directory. Users tech1 and tech2 are in
the techdocs group. User database1 is not in that group.
1. Switch to the tech1 user. Use touch to create a file called techdoc1.txt in the /home/techdocs directory. Exit from
the tech1 user shell.
2. [root@serverb ~]# su - tech1
3. [tech1@serverb ~]$ touch /home/techdocs/techdoc1.txt
4. [tech1@serverb ~]$ ls -l /home/techdocs/techdoc1.txt
5. -rw-rw-r--. 1 tech1 techdocs 0 Feb 5 16:42 /home/techdocs/techdoc1.txt
6. [tech1@serverb ~]$ exit
7. logout

[root@serverb ~]#
8. Switch to the tech2 user. Use the echo command to add some content to the /home/techdocs/techdoc1.txt file. Exit
from the tech2 user shell.
9. [root@serverb ~]# su - tech2
10. [tech2@serverb ~]$ cd /home/techdocs
11. [tech2@serverb techdocs]$ echo "This is the first tech doc." > techdoc1.txt
12. [tech2@serverb techdocs]$ exit
13. logout

[root@serverb ~]#
14. Switch to the database1 user. Use the echo command to append some content to
the /home/techdocs/techdoc1.txt file. Notice that you will get a Permission Denied message. Use the ls -l command to
confirm that database1 does not have access to the file. Exit from the database1 user shell.
15. [root@serverb ~]# su - database1
16. [database1@serverb ~]$ echo "This is the first tech doc." \
17. >> /home/techdocs/techdoc1.txt
18. -bash: /home/techdocs/techdoc1.txt: Permission denied
19. [database1@serverb ~]$ ls -l /home/techdocs/techdoc1.txt
20. ls: cannot access '/home/techdocs/techdoc1.txt': Permission denied
21. [database1@serverb ~]$ exit
22. logout

[root@serverb ~]#
Modify the global login scripts. Normal users should have a umask setting that prevents others from viewing or modifying
new files and directories.
1. Determine the umask of the student user. Use the su - student command to switch to student login shell. When
done exit from the shell.
2. [root@serverb ~]# su - student
3. [student@serverb ~]$ umask
4. 0002
5. [student@serverb ~]$ exit
6. logout

[root@serverb ~]#
7. Create the /etc/profile.d/local-umask.sh file with the following content to set the umask to 007 for users with a UID
greater than 199 and with a username and primary group name that match, and to 022 for everyone else:
8. [root@serverb ~]# cat /etc/profile.d/local-umask.sh
9. # Overrides default umask configuration
10. if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
11. umask 007
12. else
13. umask 022

fi
14. Log out of the shell and log back in as student to verify that global umask changes to 007.
15. [root@serverb ~]# exit
16. logout
17. [student@serverb ~]$ exit
18. logout
19. Connection to serverb closed.
20. [student@workstation ~]$ ssh student@serverb
21. ...output omitted...
22. [student@serverb ~]$ umask

0007
Log off from serverb.
[student@serverb ~]$ exit
logout
Connection to serverb closed.
Evaluation
On workstation, run the lab perms-review grade script to confirm success on this exercise.
[student@workstation ~]$ lab perms-review grade
Finish
On workstation, run the lab perms-review finish script to complete the lab.
[student@workstation ~]$ lab perms-review finish

Summary
In this chapter, you learned:
 Files have three categories to which permissions apply. A file is owned by a user, a single group, and other users.
The most specific permission applies. User permissions override group permissions and group permissions override other
permissions.
 The ls command with the -l option expands the file listing to include both the file permissions and ownership.
 The chmod command changes file permissions from the command line. There are two methods to represent
permissions, symbolic (letters) and numeric (digits).
 The chown command changes file ownership. The -R option recursively changes the ownership of a directory tree.
 The umask command without arguments displays the current umask value of the shell. Every process on the
system has a umask. The default umask values for Bash are defined in the /etc/profile and /etc/bashrc files.

[student@workstation ~]$ lab processes-review start


On workstation, open two terminal windows side by side. In this section, these terminals are referred to as left and right. On
each terminal window, log in to serverb as the student user.
Create a script called process101, which will generate artificial CPU load. Create the script in
the /home/student/bin directory.
#!/bin/bash
while true; do
var=1
while [[ var -lt 50000 ]]; do
var=$(($var+1))
done
sleep 1
done
1. On workstation, open two terminal windows side by side. In each terminal, use the ssh command to log in
to serverb as the student user.
2. [student@workstation ~]$ ssh student@serverb
3. ...output omitted...

[student@serverb ~]$
4. In the left terminal shell, use the mkdir command to create the /home/student/bin directory.
[student@serverb ~]$ mkdir /home/student/bin
5. In the left terminal shell, use the vim command to create the process101 script. Press the i key to enter interactive
mode. Type :wq to save the file.
6. [student@serverb ~]$ vim /home/student/bin/process101
7. #!/bin/bash
8. while true; do
9. var=1
10. while [[ var -lt 50000 ]]; do
11. var=$(($var+1))
12. done
13. sleep 1

done
14. Use the chmod command to make the process101 file executable.
[student@serverb ~]$ chmod +x /home/student/bin/process101
In the right window, run the top utility.
1. In the right window, run the top utility. Size the window to be as tall as possible.
2. [student@serverb ~]$ top
3. top - 13:47:06 up 19 min, 2 users, load average: 0.00, 0.00, 0.00
4. Tasks: 110 total, 1 running, 109 sleeping, 0 stopped, 0 zombie
5. %Cpu(s): 0.0 us, 3.1 sy, 0.0 ni, 96.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
6. MiB Mem : 1829.4 total, 1439.1 free, 171.9 used, 218.4 buff/cache
7. MiB Swap: 1024.0 total, 1024.0 free, 0.0 used. 1499.6 avail Mem
8.
9. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME COMMAND
10. 1 root 20 0 178536 13488 8996 S 0.0 0.7 0:01.15 systemd
11. 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
12. 3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp
13. 4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp
14. 6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/0:0H-kblockd

...output omitted...
In the left terminal shell, determine the number of logical CPUs on the virtual machine. Run the process101 script in the
background.
1. Use the grep command to determine the number of logical CPUs.
2. [student@serverb ~]$ grep "model name" /proc/cpuinfo | wc -l

2
3. Use the cd command to change into the /home/student/bin directory. Run the process101 script in the background.
4. [student@serverb ~]$ cd /home/student/bin
5. [student@serverb bin]$ process101 &

[1] 1180
In the right terminal shell, observe the top display. Toggle between load, threads and memory. Note the process ID (PID)
for process101. View the CPU percentage. It should hover around 10% to 15%. Ensure that top is showing CPU usage
once you have viewed load, threads, and memory.
1. Press Shift+m.
2. top - 13:56:24 up 28 min, 2 users, load average: 0.21, 0.08, 0.02
3. Tasks: 112 total, 2 running, 110 sleeping, 0 stopped, 0 zombie
4. %Cpu(s): 5.8 us, 1.3 sy, 0.0 ni, 92.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
5. MiB Mem : 1829.4 total, 1438.1 free, 172.7 used, 218.6 buff/cache
6. MiB Swap: 1024.0 total, 1024.0 free, 0.0 used. 1498.7 avail Mem
7.
8. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9. 705 root 20 0 409956 34880 33620 S 0.0 1.9 0:00.04 sssd_nss
10. 706 root 20 0 454304 34472 14304 S 0.0 1.8 0:00.62 firewalld
11. 725 root 20 0 611348 28244 14076 S 0.0 1.5 0:00.27 tuned
12. 663 polkitd 20 0 1907312 23876 16040 S 0.0 1.3 0:00.04 polkitd
13. 718 root 20 0 600316 17176 14832 S 0.0 0.9 0:00.06 NetworkManager

...output omitted...

Note
Note that when top is switched into memory mode, process101 is no longer the first process. You can press Shift+p to
return to CPU usage.
1. Press m.
2. top - 09:32:52 up 20:05, 2 users, load average: 0.18, 0.10, 0.03
3. Tasks: 112 total, 2 running, 110 sleeping, 0 stopped, 0 zombie
4. %Cpu(s): 7.8/1.5 9[||||||||| ]
5. MiB Mem : 18.3/1829.4 [||||||||||||||||||| ]
6. MiB Swap: 0.0/1024.0 [ ]
7. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8. 705 root 20 0 409956 34880 33620 S 0.0 1.9 0:00.04 sssd_nss
9. 706 root 20 0 454304 34472 14304 S 0.0 1.8 0:00.62 firewalld
10. 725 root 20 0 611348 28244 14076 S 0.0 1.5 0:00.30 tuned
11. 663 polkitd 20 0 1907312 23876 16040 S 0.0 1.3 0:00.04 polkitd
12. 718 root 20 0 600316 17176 14832 S 0.0 0.9 0:00.07 NetworkManager

...output omitted...
13. Press t.
14. Tasks: 113 total, 2 running, 111 sleeping, 0 stopped, 0 zombie
15. %Cpu(s): 7.8/1.5 9[||||||||| ]
16. MiB Mem : 1829.4 total, 1436.7 free, 173.7 used, 219.0 buff/cache
17. MiB Swap: 1024.0 total, 1024.0 free, 0.0 used. 1497.7 avail Mem
18.
19. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20. 1180 student 20 0 222448 3056 2808 S 12.0 0.2 1:59.94 process101
21. 705 root 20 0 409956 34880 33620 S 0.0 1.9 0:00.04 sssd_nss
22. 706 root 20 0 454304 34472 14304 S 0.0 1.8 0:00.62 firewalld
23. 725 root 20 0 611348 28244 14076 S 0.0 1.5 0:00.30 tuned
24. 663 polkitd 20 0 1907312 23876 16040 S 0.0 1.3 0:00.04 polkitd
25. 718 root 20 0 600316 17176 14832 S 0.0 0.9 0:00.07 NetworkManager

...output omitted...
26. Press Shift+p.
27. top - 09:35:48 up 20:08, 2 users, load average: 0.10, 0.10, 0.04
28. Tasks: 110 total, 4 running, 106 sleeping, 0 stopped, 0 zombie
29. %Cpu(s): 6.8 us, 1.0 sy, 0.0 ni, 92.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
30. MiB Mem : 18.3/1829.4 [||||||||||||||||||| ]
31. MiB Swap: 0.0/1024.0 [ ]
32.
33. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
34. 27179 student 20 0 222448 3060 2812 R 15.6 0.2 1:13.47 process101

...output omitted...
Turn off the use of bold in the display. Save this configuration for reuse when top is restarted. Confirm that the changes are
saved.
1. Press Shift+b to switch the use of bold off.
2. top - 19:40:30 up 6:12, 2 users, load average: 0.11, 0.12, 0.09
3. Tasks: 112 total, 1 running, 111 sleeping, 0 stopped, 0 zombie
4. %Cpu(s): 7.6/1.5 9[||||||||| ]
5. MiB Mem : 18.2/1829.4 [||||||||||||||||||| ]

MiB Swap: 0.0/1024.0 [ ]


6. Press Shift+w to save this configuration. The default configuration is stored in toprc beneath
the /home/student/.config/procps directory. In the left terminal shell, confirm that the toprc file exists.
7. [student@serverb bin]$ ls -l /home/student/.config/procps/toprc

-rw-rw-r--. 1 student student 966 Feb 18 19:45 /home/student/.config/procps/toprc


8. In the right terminal shell, exit top, and then restart it. Confirm that the new display uses the saved configuration.
9. top - 00:58:21 up 43 min, 2 users, load average: 0.29, 0.28, 0.20
10. Tasks: 105 total, 1 running, 104 sleeping, 0 stopped, 0 zombie
11. %Cpu(s): 11.0/1.8 13[||||||||||||| ]
12. MiB Mem : 18.7/1829.0 [||||||||||||||||||| ]

MiB Swap: 0.0/0.0 [ ]


Copy the process101 script to a new file called process102. Edit the script to create more artificial CPU load. Increase the
load from fifty thousand to one hundred thousand. Start the process102 process in the background.
1. In the left terminal shell, use the cp command to copy process101 to process102.
[student@serverb bin]$ cp process101 process102
2. Use the vim command to edit the process102 script. Increase the addition problems from fifty thousand to one
hundred thousand. Enter interactive mode by using the i. Type :wq to save the file.
3. [student@serverb bin]$ vim process102
4. #!/bin/bash
5. while true; do
6. var=1
7. while [[ var -lt 100000 ]]; do
8. var=$(($var+1))
9. done
10. sleep 1

done
11. Start the process102 process in the background.
12. [student@serverb bin]$ process102 &

[2] 20723
13. Use the jobs command to confirm that both processes are running in the background.
14. [student@serverb bin]$ jobs
15. [1]- Running process101 &

[2]+ Running process102 &


In the right terminal shell, confirm that the process is running and using the most CPU resources. The load should be
hovering between 25% and 35%.
1. In the right terminal shell, confirm that the process is running and using the most CPU resources. The load should
be hovering between 25% and 35%.
2. top - 20:14:16 up 6:46, 2 users, load average: 0.58, 0.34, 0.18
3. Tasks: 112 total, 2 running, 110 sleeping, 0 stopped, 0 zombie
4. 499 %Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
5. 500 MiB Mem : 1829.4 total, 1428.7 free, 179.0 used, 221.8 buff/cache
6. 501 MiB Swap: 1024.0 total, 1024.0 free, 0.0 used. 1492.1 avail Mem
7.
8. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9. 20723 student 20 0 222448 3016 2764 S 24.7 0.2 0:53.28 process102
10. 1180 student 20 0 222448 3056 2808 S 12.0 0.2 58:01.56 process101

...output omitted...
Note
If you do not see process101 and process102 at the top of the process list, press Shift+p to ensure that top is sorted by CPU
utilization.
The load average is still below 1. Copy process101 to a new script called process103. Increase the addition count to eight
hundred thousand. Start process103 in the background. Confirm that the load average is above 1. It may take a few minutes
for the load average to change.
1. In the right terminal shell, confirm that the load average is below 1.
2. top - 20:24:13 up 6:56, 2 users, load average: 0.43, 0.41, 0.29

...output omitted...
3. In the left terminal shell, use the cp command to copy process101 to a new script called process103.
[student@serverb bin]$ cp process101 process103
4. In the left terminal shell, use the vim command to edit the process103 script. Increase the addition count to eight
hundred thousand. Enter interactive mode using the i key. Type :wq to save the file.
5. [student@serverb bin]$ vim process103
6. #!/bin/bash
7. while true; do
8. var=1
9. while [[ var -lt 800000 ]]; do
10. var=$(($var+1))
11. done
12. sleep 1

done
13. Start process103 in the background. The CPU usage hovers between 60% and 85%.
14. [student@serverb bin]$ process103 &
[3] 22751
15. Confirm that all three jobs are running in the background.
16. [student@serverb bin]$ jobs
17. [1] Running process101 &
18. [2]- Running process102 &

[3]+ Running process103 &


19. In the right terminal window confirm that the load average is above 1.
top - 20:45:34 up 7:17, 2 users, load average: 1.10, 0.90, 0.64
In the left terminal shell, become root. Suspend the process101 process. List the remaining jobs. Observe that the process
state for process101 is now T.
1. Use the su - command to become root. The password is redhat.
2. [student@serverb bin]$ su -

Password: redhat
3. Use the pkill command with the -SIGSTOP option to suspend the process101 process.
[root@serverb ~]# pkill -SIGSTOP process101
4. In the right terminal shell confirm that process101 is no longer running.
5. top - 20:52:01 up 7:24, 2 users, load average: 1.19, 1.19, 0.89
6. Tasks: 112 total, 2 running, 110 sleeping, 0 stopped, 0 zombie
7. 499 %Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
8. 500 MiB Mem : 1829.4 total, 1428.7 free, 179.0 used, 221.8 buff/cache
9. 501 MiB Swap: 1024.0 total, 1024.0 free, 0.0 used. 1492.1 avail Mem
10.
11. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12. 24043 student 20 0 222448 2992 2744 R 66.1 0.2 6:59.50 process103
13. 20723 student 20 0 222448 3016 2764 R 29.9 0.2 11:04.84 process102

...output omitted...
14. In the left terminal shell run the ps jT command to view the remaining jobs.
15. [root@serverb ~]# ps jT
16. PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
17. ...output omitted...
18. 27138 1180 1180 27138 pts/0 28558 T 1000 3:06 /bin/bash /home/student/bin/process101
19. 27138 20723 20723 27138 pts/0 28558 R 1000 1:23 /bin/bash /home/student/bin/process102
20. 27138 24043 24043 27138 pts/0 28558 R 1000 2:35 /bin/bash /home/student/bin/process103

...output omitted...
Note that process101 has a status of T. This denotes that the process is currently suspended.
Resume the process101 process.
1. In the left terminal shell use the pkill command with the -SIGCONT option to resume the process101 process.
[root@serverb ~]# pkill -SIGCONT process101
2. In the right terminal shell confirm that the process is running again.
3. top - 20:57:02 up 7:29, 2 users, load average: 1.14, 1.20, 0.99
4. Tasks: 112 total, 2 running, 110 sleeping, 0 stopped, 0 zombie
5. %Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
6. MiB Mem : 1829.4 total, 1428.7 free, 179.0 used, 221.8 buff/cache
7. MiB Swap: 1024.0 total, 1024.0 free, 0.0 used. 1492.1 avail Mem
8.
9. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10. 24043 student 20 0 222448 2992 2744 R 66.8 0.2 10:40.61 process103
11. 20723 student 20 0 222448 3016 2764 S 24.9 0.2 12:25.10 process102

1180 student 20 0 222448 3056 2808 S 17.9 0.2 64:07.99 process101


Terminate process101, process102, and process103 using the command line. Confirm that the processes are no longer
displayed in top.
1. In the left terminal shell, use the pkill command terminate process101, process102, and process103.
2. [root@serverb ~]# pkill process101
3. [root@serverb ~]# pkill process102

[root@serverb ~]# pkill process103


4. In the right terminal shell, confirm that the processes no longer appear in top.
5. top - 21:05:06 up 7:37, 2 users, load average: 1.26, 1.29, 1.12
6. Tasks: 112 total, 2 running, 110 sleeping, 0 stopped, 0 zombie
7. 499 %Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
8. 500 MiB Mem : 1829.4 total, 1428.7 free, 179.0 used, 221.8 buff/cache
9. 501 MiB Swap: 1024.0 total, 1024.0 free, 0.0 used. 1492.1 avail Mem
10.
11. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12. 1 root 20 0 178536 13488 8996 S 0.0 0.7 0:01.21 systemd
13. 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
14. 3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp

...output omitted...
In the left terminal shell, exit from the root user. In the right terminal shell stop the top command. Exit from serverb in both
windows.
1. Use the exit command to log out from the root user.
2. [root@serverb ~]# exit
3. logout
4. [1] Terminated process101
5. [2] Terminated process102

[3]- Terminated process103


6. Exit from all terminal windows.
7. [student@serverb bin]$ exit

[student@workstation ~]$
8. In the right terminal shell, press q to quit top. Use the exit command to log out.
9. [student@serverb ~]$ exit
10. logout
11. Connection to serverb closed.

[student@workstation ~]$
Evaluation
On workstation, run the lab processes-review grade script to confirm success on this exercise.
[student@workstation ~]$ lab processes-review grade
Finish
On workstation, run the lab processes-review finish script to complete the lab.
[student@workstation ~]$ lab processes-review finish

Summary
In this chapter, you learned:
 A process is a running instance of an executable program. Processes are assigned a state, which can be running,
sleeping, stopped, or zombie. The ps command is used to list processes.
 Each terminal is its own session and can have foreground process and independent background processes.
The jobs command displays processes within a terminal session.
 A signal is a software interrupt that reports events to an executing program. The kill, pkill, and killall commands
use signals to control processes.
 Load average is an estimate of how busy the system is. To display load average values, you can use
the top, uptime, or w command.

Bab:9
Summary
In this chapter, you learned:
 systemd provides a method for activating system resources, server daemons, and other processes, both at boot time
and on a running system.
 Use the systemctl to start, stop, reload, enable, and disable services.
 Use the systemctl status command to determine the status of system daemons and network services started
by systemd.
 The systemctl list-dependencies command lists all service units upon which a specific service unit depends.
 systemd can mask a service unit so that it does not run even to satisfy dependencies.

BAB: 10
Summary
In this chapter, you learned:
 The ssh command allows users to access remote systems securely using the SSH protocol.
 A client system stores remote servers' identities in ~/.ssh/known_hosts and /etc/ssh/ssh_known_hosts.
 SSH supports both password-based and key-based authentication.
 The ssh-keygen command generates an SSH key pair for authentication. The ssh-copy-id command exports the
public key to remote systems.
 The sshd service implements the SSH protocol on Red Hat Enterprise Linux systems.
 It is a recommended practice to configure sshd to disable remote logins as root and to require public key
authentication rather than password-based authentication.

Bab:11
Summary
In this chapter, you learned:
 The systemd-journald and rsyslog services capture and write log messages to the appropriate files.
 The /var/log directory contains log files.
 Periodic rotation of log files prevent them from filling up the file system space.
 The systemd journals are temporary and do not persist across reboot.
 The chronyd service helps to synchronize time settings with a time source.
 The time zone of the server can be updated based on its location.

Bab:12:
Summary
In this chapter, you learned:
 The TCP/IP network model is a simplified, four-layered set of abstractions that describes how different protocols
interoperate in order for computers to send traffic from one machine to another over the Internet.
 IPv4 is the primary network protocol used on the Internet today. IPv6 is intended as an eventual replacement for the
IPv4 network protocol. By default, Red Hat Enterprise Linux operates in dual-stack mode, using both protocols in parallel.
 NetworkManager is a daemon that monitors and manages network configuration.
 The nmcli command is a command-line tool for configuring network settings with NetworkManager.
 The system's static host name is stored in the /etc/hostname file. The hostnamectl command is used to modify or
view the status of the system's host name and related settings. The hostname command displays or temporarily modifies
the system's host name.

Bab:13
Summary
In this chapter, you learned:
 The tar command creates an archive file from a set of files and directories, extracts files from the archive, and lists
the contents of an archive.
 The tar command provides a set of different compression methods reduce archive size.
 Besides providing a secure remote shell, the SSH service also provides the scp and sftp commands as secure ways
to transfer files from and to a remote system running the SSH server.
 The rsync command securely and efficiently synchronizes files between two directories, either one of which can be
on a remote system.

Bab 14:
Summary
In this chapter, you learned:
 Red Hat Subscription Management provides tools to entitle machines to product subscriptions, get updates to
software packages, and track information about support contracts and subscriptions used by the systems.
 Software is provided as RPM packages, which make it easy to install, upgrade, and uninstall software from the
system.
 The rpm command can be used to query a local database to provide information about the contents of installed
packages and install downloaded package files.
 yum is a powerful command-line tool that can be used to install, update, remove, and query software packages.
 Red Hat Enterprise Linux 8 uses Application Streams to provide a single repository to host multiple versions of an
application's packages and its dependencies.

Bab 15:
Summary
In this chapter, you learned:
 Storage devices are represented by a special file type called block device.
 The df command reports total disk space, used disk space, and free disk space on all mounted regular file systems.
 The mount command allows the root user to manually mount a file system.
 All processes need to stop accessing the mount point in order to successfully unmount the device.
 The removable storage devices are mounted in the /run/media directory when using the graphical environment.
 The find command performs a real-time search in the local file systems to find files based on search criteria.
Bab:16
Summary
In this chapter, you learned:
 Web Console is a web-based management interface to your server based on the open source Cockpit service.
 Web Console provides graphs of system performance, graphical tools to manage system configuration and inspect
logs, and an interactive terminal interfaces.
 Red Hat Customer Portal provides you with access to documentation, downloads, optimization tools, support case
management, and subscription and entitlement management for your Red Hat products.
 redhat-support-tool is a command-line tool to query Knowledgebase and work with support cases from the
server's command line.
 Red Hat Insights is a SaaS-based predictive analytics tool to help you identify and remediate threats to your
systems' security, performance, availability, and stability.

You might also like