CSIT 184 Quiz Questions
Which of these log files stores most syslog messages, with the exception of those that are related to authentication, mail, scheduled jobs, and debugging?
/var/log/messages
What exit code means the script/program ran successfully
0
What is the default nice value
0
What is the nice value assigned to the lowest priority process?
19
Which answer displays output to a terminal and ignores all errors?
2>/dev/null
What is the number top gives the lowest priority processes
39
What is the maximum number of primary partitions in an MBR configured disk?
4
Which answer saves output to a file and discards error messages?
> file 2> /dev/null
Which answer sends output and errors to the same file ensuring existing file content is preserved?
>>file 2>&1
Which answer sends output to a file and sends errors to a different file?
>file 2>file2
Which pattern will match only filenames at least three characters in length?
???*
What is the default ACL?
ACL applied to new files in the folder
ACL on linux systems stands for:
Access Control List
What is the setsebool command used for?
Activate and deactivate SELinux policy rules
If you are running a database server and the time is off by a couple of minutes. Do you want to: jump the time to the correct time skew the time slowly until it is correct
Skew
Which state represents a process that is sleeping until some condition is met?
S
What is the error output pipe called
STDERR
What is the normal output pipe called
STDOUT
Which term describes the interpreter that executes commands typed as strings?
Shell
Which process does a parent use to create a new child process?
fork
What command shows the ACLs of a file or directory
getfacl
Which item or file represents the location of the user's personal files?
home directory
What is the command to set a service to automatically start on boot?
systemctl enable <service>
What is the command to prevent a service from being started?
systemctl mask <service>
What is the command to start a service?
systemctl start <service>
What is the command to find the state of a service?
systemctl status <service>
Which systemd unit regularly triggers the cleanup of the temporary files?
systemd-tmpfiles-clean.timer
What command do we use to set the time?
timedatectl
How do we copy our private key to the remote host?
we should not be copying our private key
What is the yum command uninstall a package
yum remove <package_name>
What option is used to compress a file archive with tar
z
Which answer sends output to both the screen and a file at the same time?
| tee file
Which directory contains regular commands and utilities?
/usr/bin
Which Bash shortcut or command is used to re-execute a recent command by matching the command name?
!string
Which answer discards all messages normally sent to the terminal?
&>/dev/null
Which answer sends both output and errors to a file, creating it or overwriting its contents?
&>file
Which pattern will match all filenames containing a "b"?
* b *
Which pattern will match only filenames ending with "b"?
*b
Which file stores syslog messages related to the mail server?
/var/log/maillog
What is the nice value assigned to the highest priority process?
-20
If you want to only apply the execute permission to directories and not files what option is used?
-X
What command is used to search in a linux manual document?
/
Choose the device file name of the third partition on the second SATA hard drive.
/dev/sdb3
What is the name of the device file for the entire second virtio-blk disk attached to a virtual machine?
/dev/vdb
Which configuration file defines the settings for the system jobs that run on a daily, weekly, and monthly basis?
/etc/anacrontab
Which directory contains the shell scripts intended to run on a daily basis?
/etc/cron.daily
Where is the system host name configured
/etc/hostname
Which item or file represents the location of the local user account information?
/etc/passwd
The system has four users assigned to the following groups: User consultant1 is in groups consultant1 and database1 User operator1 is in groups operator1 and database1 User contractor1 is in groups contractor1 and contractor3 User operator2 is in groups operator2 and contractor3 The current directory (.) contains four files with the following permissions information: drwxrwxr-x. operator1 database1 . -rw-rw-r--. consultant1 consultant1 lfile1 -rw-r--rw-. consultant1 database1 lfile2 -rw-rw-r--. operator1 database1 rfile1 -rw-r-----. operator1 database1 rfile2 Which files can be deleted by the operator1 user?
All of the above.
Which task(s) can be performed with RedHat Subscription Management tools?
All of the above.
Network interface names are determined by their bus type and the detection order of devices during boot. On older systems the names all started with ith
False
Rsync does a bidirectional sync
False
The rpm command will automatically download dependencies if they are available in the configured repositories.
False
Which item represents a number that identifies the group at the most fundamental level?
GID
What is the new style Partitioning Scheme?
GPT
The system has four users assigned to the following groups: User consultant1 is in groups consultant1 and database1 User operator1 is in groups operator1 and database1 User contractor1 is in groups contractor1 and contractor3 User operator2 is in groups operator2 and contractor3 The current directory (.) contains four files with the following permissions information: drwxrwxr-x. operator1 database1 . -rw-rw-r--. consultant1 consultant1 lfile1 -rw-r--rw-. consultant1 database1 lfile2 -rw-rw-r--. operator1 database1 rfile1 -rw-r-----. operator1 database1 rfile2 Which files can be deleted by the operator2 user?
None of the above.
Which term describes the part of the command line that adjusts the behavior of a command?
Option
What line do we change to deny access by password for sshd?
PasswordAuthentication no
What line do we set to deny Root the ability to ssh directly to the host for sshd?
PermitRootLogin no
Which Bash shortcut or command copies the last argument of previous commands?
Pressing Esc+.
Which Bash shortcut or command is used to complete commands, file names, and options?
Pressing Tab
Which state represents a process that has been stopped or suspended?
T
A common reason for file systems to fail to unmount is that a Bash shell is using the mount point or a subdirectory as a current working directory. Use the cd command to change out of the file system to resolve this problem.
True
DHCP automatically rewrites the /etc/resolv.conf file as interfaces are started unless you specify
True
Red Hat is one of the top three companies updating the Linux kernel
True
The location of DNS servers is in /etc/resolv.conf
True
The nmcli con down name command brings down the connection
True
The yum command will automatically download dependencies if they are available in the configured repositories.
True
You can use the swapon command to activate a formatted swap space.
True
Which state represents a process that has released all of its resources except its PID?
Z
Which pattern will match only filenames that begin with an uppercase letter?
[[:upper:]]*
Which command displays all the user jobs that are currently scheduled to run as deferred jobs?
atq
Which command removes the deferred user job that has the job number 5?
atrm 5
What does setting ipv4.method need to be set to so that the connection uses dhcp?
auto
You decide you want to preserve the journald entries between reboots. Which do you do?
create the directory /var/log/journal
Which command provides an overview of the file system mount points and the amount of free space available in SI units?
df -H
What is the proper syntax to end a for loop in bash
done
Which command give you a summary of the disk space used under the current directory?
du -s ./*
What is the proper syntax to end an if clause in bash
fi
What program would you use to view the files in /usr/share/doc?
firefox or another web browser
The system has four users assigned to the following groups: User consultant1 is in groups consultant1 and database1 User operator1 is in groups operator1 and database1 User contractor1 is in groups contractor1 and contractor3 User operator2 is in groups operator2 and contractor3 The current directory (.) contains four files with the following permissions information: drwxrwxr-x. operator1 database1 . -rw-rw-r--. consultant1 consultant1 lfile1 -rw-r--rw-. consultant1 database1 lfile2 -rw-rw-r--. operator1 database1 rfile1 -rw-r-----. operator1 database1 rfile2 Which file can be modified by the contractor1 user?
lfile2
Which item represents the program that provides the user's command-line prompt?
login shell
What is the command to see the manual page for chmod
man chmod
What command is used to add a partition to the file tree?
mount
What is the fourth field of the /etc/passwd file?
primary group
What is the command to change a process's nice value
renice
What command changes the selinux context of a file based on the selinux policy defaults?
restorecon
What package do we install to get better error logs abour selinux
setroubleshoot-server
How do we create a key pair for ssh logins?
ssh-keygen
What filesystem type is used for linux swap partions
swap
The system has four users assigned to the following groups: User consultant1 is in groups consultant1 and database1 User operator1 is in groups operator1 and database1 User contractor1 is in groups contractor1 and contractor3 User operator2 is in groups operator2 and contractor3 The current directory (.) contains four files with the following permissions information: drwxrwxr-x. operator1 database1 . -rw-rw-r--. consultant1 consultant1 lfile1 -rw-r--rw-. consultant1 database1 lfile2 -rw-rw-r--. operator1 database1 rfile1 -rw-r-----. operator1 database1 rfile2 Which regular file is owned by operator1 and readable by all users?
rfile1
The system has four users assigned to the following groups: User consultant1 is in groups consultant1 and database1 User operator1 is in groups operator1 and database1 User contractor1 is in groups contractor1 and contractor3 User operator2 is in groups operator2 and contractor3 The current directory (.) contains four files with the following permissions information: drwxrwxr-x. operator1 database1 . -rw-rw-r--. consultant1 consultant1 lfile1 -rw-r--rw-. consultant1 database1 lfile2 -rw-rw-r--. operator1 database1 rfile1 -rw-r-----. operator1 database1 rfile2 Which file cannot be read by the operator2 user?
rfile2
What command is used to extract all the files from a package.
rpm2cpio <package> | cpio -id
Which service sorts and organizes syslog messages into files in /var/log?
rsyslog
What command can we use to get detailed easily readable information about an selinux event?
sealert
What does scp stand for
secure copy
How do we temporarily turn off SELinx
setenforce 0
What command modifies the ACLs of a file or directory
setfacl