Network Administration Using Linux Final Exam Study Guide
Kate wants to compare two text files to identify what might have been changed from one version to another. Which of the following commands can she use to do this?
diff document1.txt document2.txt
Which of the following are valid permissions for a directory where the command chmod 1777 has been used to set the permissions on it?
drwxrwxrwt
After a shell is no longer needed, what command can be given to exit the shell?
exit
Which of the following commands will display all files and directories within the /var/log directory or its subdirectories which are owned by the root user? (Choose two.)
find /var/log -user root find -user root -print /var/log".
Which of the following terms describes a type of useful and legitimate software that is distributed by a developer where they do not charge for the software but also do not distribute the source code along with it?
freeware
What argument can be used with the chmod command to add read permission and remove write permission for a group on a file?
g+r-w
Select the command that can be used to provide a long listing for each file in a directory:
ls -L
Wayne is using the command line and is in his home directory. Which of the following will display a list of all files and their sizes from his home directory? (Choose two.)
ls -al ~ ls -al /home/wayne
Mindy wants to create a new subdirectory at ~/2019projects/projectx/projectplans to start storing the initial project plans for projectx. However, this is the first project she has worked on in 2019 and the 2019projects directory does not exist yet. Which of the following commands will create the higher level directories if they do not already exist?
mkdir -p ~/2019projects/project/projectplans
Jim wants to rename a directory for a project that he has been working on. Which of the following commands can he use to perform that action?
mv projectx projecty
Which of the following types of servers can be used to cache requested Internet resources so that they can be more quickly delivered to users requesting the same resource while at the same time reducing the burden on the external network connection to the Internet for an organization?
proxy server
Mike has changed directory into one subdirectory after the next and has lost track of where he's at in the directory tree. Which of the following commands can he use to tell him the full path to the current subdirectory he is in?
pwd
Which of the following commands will delete a directory and all of the files contained within it? (Choose all that apply.)
rm -rf olddir
What command can be used to display the last five lines of a text file?
tail -5
Jean installs a distribution of Linux on a workstation and attempts to run the locate command to find a certain file. Instead of returning the results she expected, an error message is displayed that it cannot find the mlocate.db file in its default location. Which of the following commands should Jean run in an attempt to resolve this problem?
updatedb
Which Linux command can be utilized to display your current login name?
whoami
What metacharacter indicates background command execution?
&
Sandra needs to obtain the latest image of Fedora so that she can install it as a virtual machine on her Windows workstation. Which of the following file formats is Sandra likely to find available for download from Fedora's website in order to allow her to use the file as the source for booting and installing Linux as a VM?
.iso
The Filesystem Hierarchy Standard specifies what directory as the root user's home directory?
/root
Under the root directory in Linux, which directory contains system commands and utilities?
/usr
At the vi command mode prompt, what key combination will force a quit from the vi editor without saving changes?
:q!
What metacharacter can be used to issue two commands to be run in consecutive order, without piping or redirecting output?
;
When using the vi text editor, which of the following keys, when in command mode, will change to insert mode and place the cursor at the end of the current line?
A
What service provides a method for the efficient transfer of files over the Internet?
FTP
When using the vi text editor, which of the following keys, when in command mode, will move to the last line in the document?
G
Which of the following is the greatest expense for companies using Linux?
Hiring people to maintain the Linux system
Which of the following can be used to synchronize the time between a number of Linux servers and workstations on a network with a time clock source on the Internet?
NTP
When using command-line terminal, specific letters that start with a dash ("-") and appear after command names are considered to be:
Options
What Linux distribution is the most commonly used distribution within organizations today?
Red Hat
If enough unique letters of a directory name have been typed, what key can be pressed to activate the BASH shell's completion feature?
Tab
An archive of files that usually contain scripts that install the software contents to the correct location on the system is referred to as a:
Tarball
If a hard link is created to a file and then the original file is deleted, which of the following is true?
The original file will be removed while the hard link remains usable to access the contents of the file.
What would be the result of running the command chown :root file1.txt
This would set the group ownership of file1 to root.
In Linux, the core component of the GUI is known as:
X Windows
Where are scheduled commands stored on Ubuntu Linux systems? a. /var/spool/cron/atjobs b. /etc/at/ c. /tmp/at d. /var/spool/at
a. /var/spool/cron/atjobs
Which of the following can be used to mount a filesystem? (Choose all that apply.) a. A device path such as /dev/sdb2 b. A filesystem UUID c. A filesystem label d. A filesystem nickname configured in /etc/mtab
a. A device path such as /dev/sdb2 b. A filesystem UUID c. A filesystem label
Which of the following is a valid Linux initialization process? a. Systemd b. GRUB c. SysV d. GRUB2
a. Systemd
Which of the following commands will prompt to convert an MBR partition to GPT, thus destroying all existing MBR partitions on a disk? a. gdisk b. cfdisk c. gfdisk d. iconv
a. gdisk
Which of the following commands will display the print jobs in the print queue for printer1 only? a. lpstat -o printer1 b. lpq -d printer1 c. lpq -p printer1 d. lp -j printer1
a. lpstat -o printer1
Which of the following commands can be used to display general hardware information for the entire system? a. lshw b. lscpu c. hwdisp d. hware
a. lshw
Which of the following commands will show a list of process names along with their process ID (PID)? (Choose two.) a. ps b. proc c. top d. jobs
a. ps c. top
Which of the following commands will show the current runlevel along with the previous runlevel? (Choose all that apply.) a. runlevel b. telinit -r c. init -r d. echo $RUNLEVEL
a. runlevel
Which of the following is a valid method of running a script named myscript.sh? (Choose two) a. source myscript.sh b. run myscript.sh c. exec ./myscript.sh d. ./myscript.sh
a. source myscript.sh d. ./myscript.sh
Which of the following commands will return one result of where the grep binary executable is located? (Choose two.) a. which grep b. locate grep c. type grep d. find grep
a. which grep c. type grep
If incompatible X Windows settings are configured, where will the errors that are generated be written to? a. ~/.xsession-errors b. ~/.xerror c. ~/.xwin-error d. /var/log/xwindows.error
a. ~/.xsession-errors
Which of the following types of encryption uses a pair of keys known as a public and private?
asymmetric
Which of the following options will change the ownership of files and directories recursively within a directory? (Choose all that apply.) a. -r b. -R c. --recursive d. --follow
b. -R c. --recursive
Which of the following is required as a separate partition in order to use LVM? a. /var b. /boot c. /tmp d. /home
b. /boot
What file in the /proc directory contains information about a computer's CPU? a. /proc/proc_info b. /proc/cpuinfo c. /proc/meminfo d. /proc/cpu_info
b. /proc/cpuinfo
Jan needs to set permissions on a file so that the owner has read, write, and execute permissions. The group should have read permissions only, and everyone else should have no access. Which of the following parameters, when used with the chmod command, would set the permissions described? a. 047 b. 740 c. 026 d. 620
b. 740
Aria has modified the hard disk that hosts the operating system by using the fdisk command. The fdisk command indicates that the new partition information must be manually reloaded. Which of the following should she do next? (Choose two. Either answer is independently correct.) a. Run the parted command b. Run the partprobe command c. Run the cfdisk program d. Reboot the system
b. Run the partprobe command d. Reboot the system
Each SCSI device attached to a system must be assigned an ID number. What is this ID number called? a. Device ID b. Target ID c. SCSI number d. SCSI controller
b. Target ID
!!Which of the following is responsible for starting tasks and services during boot, stopping them during shutdown, and supervising them while the system is running? a. Kickstart b. Upstart c. GRUB d. POST
b. Upstart
Which command can be used to create a new command that will monitor the contents of auth.log as they get added to the file? a. create showauth='tail -f /var/log/auth.log' b. alias showauth='tail -f /var/log/auth.log' c. new showauth as 'cat -f /var/log/auth.log' d. ln showauth='tail -f /var/log/auth.log'
b. alias showauth='tail -f /var/log/auth.log'
Which of these commands will set the following permissions on file1.txt? User = Read, Write, Execute Group = Read, Execute Others = Read a. chmod o=rwx,g=rx,u=r file1.txt b. chmod u=rwx, g=rx, u=r file1.txt c. chmod 754 file1.txt d. chmod file1.txt 754
b. chmod u=rwx, g=rx, u=r file1.txt c. chmod 754 file1.txt
Which of the following is the log file where the Debian Package Manager writes entries for actions taken and packages installed? a. dpm.log b. dpkg.log c. dpackage.log d. packages.log
b. dpkg.log
You have started a job running in the background that you want to now bring to the front so that you can watch it execute. Which of the following commands can be used to display the job's output to the terminal? a. disp b. fg c. front d. jobs -f
b. fg
Which of the following commands can you use to view events within the journald database? a. journald --list b. journalctl c. journal --display d. viewlogs --journald
b. journalctl
Which of the following commands can be used to set the default printer for all users on a Linux system where printer1 is the name of the printer? a. lp -d printer1 b. lpoptions -d printer1 c. lpd -d printer1 d. lpq --set-default printer1
b. lpoptions -d printer1
Which of the following commands can be used to see files that are currently being used by a specific process ID (PID)? a. psfiles b. lsof c. pstatus d. pids
b. lsof
What command is used to display the lineage of a process by tracing its PPIDs until the init daemon? a. psbranch b. pstree c. psparent d. pshead
b. pstree
Which of the following commands will shut down a Linux system? (Choose all that apply.) a. runlevel 0 b. telinit 0 c. shutdown -h now d. poweroff
b. telinit 0 c. shutdown -h now d. poweroff
John has been using the cdrom on his computer that is running the Linux operating system. He pushes the eject button on the front of the drive, but it doesn't eject the disk. Which of the following commands should he run? (Choose all that apply.) a. unmount /media/cdrom b. umount /media/cdrom c. eject /media/cdrom d. detach /media/cdrom
b. umount /media/cdrom c. eject /media/cdrom
Which of the following is the first field of the /etc/passwd file? a. UID b. username c. GECOS d. GID
b. username
Which of the following commands can be used to schedule very frequent recurring tasks, such as running once every minute? a. run b. watch c. do d. while
b. watch
Which of the following commands will count the number of lines in a file named data.csv? a. lc data.csv b. wc -l data.csv c. lines data.csv d. count -l data.csv
b. wc -l data.csv
Which of the following would be the device file for the third partition on the second SATA drive on a Linux system? a. /dev/hdb3 b. /dev/hdc2 c. /dev/sdb3 d. /dev/sdc2
c. /dev/sdb3
Which file should be configured so that quotas are enabled at boot time? a. /etc/edquota b. /etc/quotas c. /etc/fstab d. /etc/fsq
c. /etc/fstab
Which of the following directories is created by default when an ext2, ext3, or ext4 filesystem is created on a device that is used by the fsck utility? a. /var/crash/ b. /var/tmp/ c. /lost+found/ d. /proc/tmp/
c. /lost+found/
If a Linux installation ends abnormally and the screen displays a fatal signal 11 error, what type of error has occurred? a. Page fault b. IRQ fault c. Segmentation fault d. RAM failure
c. Segmentation fault
Which of the following accessibility features simulates simultaneous key presses when two keys are pressed in sequence? a. Bounce Keys b. Repeat Keys c. Sticky Keys d. Slow Keys
c. Sticky Keys
Which of the following does a Linux kernel use to store the value of epoch time? a. The number of days since January 1, 1900 b. The number of minutes since January 1, 1900 c. The number of seconds since January 1, 1970 d. The number of milliseconds since January 1, 1980
c. The number of seconds since January 1, 1970
Which of the following is the common escape sequence to display a horizontal tab using the echo command? a. \tab b. ?tab c. \t d. %tab
c. \t
A system administrator wants to schedule a task to run at 11 pm, but knows that she will not be in the office at that time. Which of the following commands can she use to schedule this task to run that night while she is at home? a. exec b. run c. at d. atq
c. at
Which of the following commands will display the exit status of the last command used in the BASH shell? a. echo $status b. echo $exit c. echo $? d. echo $!
c. echo $?
Which of the following commands should you use to specify that you want to use Git for version tracking on them? a. git version b. git track c. git add d. git new
c. git add
Which of the following will look at the /etc/passwd file for any lines containing the word root and display them out to the screen while simultaneously writing the results to a file? a. cat /etc/passwd | grep root | merge ~/root.txt b. cat /etc/passwd | grep root >> ~/root.txt c. grep root /etc/passwd | tee ~/root.txt d. grep root /etc/passwd | split ~/root.txt
c. grep root /etc/passwd | tee ~/root.txt
Which of the following commands can a user run to display the groups that they are a member of? a. groupmod --list b. groups --list c. groups d. groupls
c. groups
Leonard wants to find detailed information about the Bluetooth kernel module. Which of the following commands can he use to display this information? a. modstatus bluetooth b. lsmod bluetooth c. modinfo bluetooth d. modstat bluetooth
c. modinfo bluetooth
Which of the following commands will display the output of a file while also displaying a line number at the left side of each line for the /etc/passwd file? a. numbers /etc/passwd b. wc -l /etc/passwd c. nl /etc/passwd d. ln /etc/passwd
c. nl /etc/passwd
Which of the following characters, when pressed while the top program is running, will allow you to change the niceness of a process? a. n b. p c. r d. d
c. r
Elijah is done working with an external USB hard drive and wants to properly disconnect it. Which of the following commands should he use before unplugging the USB cable? a. unmount b. disable c. umount d. mount --eject
c. umount
Which of the following commands can be used to delete a user account? a. deluser b. rmuser c. userdel d. expireuser
c. userdel
Which of the following is a special group that provides its members with the ability to run the su and sudo commands? a. sudoers b. adm c. wheel d. sys
c. wheel
Which of the following states describe a process that is waiting for a parent process to release its PID? a. wait b. suspended c. zombie d. dead
c. zombie
In order to move from the /home/joe/test/data to the /home/joe directory, what command should be issued
cd ../..
Which of the following characters can be entered at the beginning of a line in a shell script to ensure that line is recognized as a comment rather than try to execute it? a. $ b. > c. % d. #
d. #
In which directory would a system administrator store scripts that should be run monthly by the cron daemon? a. /var/cron/monthly b. /etc/crontab/monthly c. /var/crontab/monthly d. /etc/cron.monthly
d. /etc/cron.monthly
To ensure that Linux has detected the correct amount of RAM in the system after installation, you should view the contents of what file in the proc directory? a. /proc/mem b. /proc/cpuinfo c. /proc/meoryinfo d. /proc/meminfo
d. /proc/meminfo
Which of the following will take output from a command and append it to the end of a file? a. < b. << c. > d. >>
d. >>
Which of the following commands will show the current user cron jobs that have been created for the currently logged in user? a. cronjobs --list b. cron --list c. cron -l d. crontab -l
d. crontab -l
Which of the following commands will display messages that were displayed during the boot sequence by the kernel? a. kdis b. kernlog c. messages d. dmesg
d. dmesg
What command can be used to check different kinds of filesystems on Linux for errors? a. chkdsk b. fs_check c. errorchk d. fsck
d. fsck
Which of the following is a type of software that allows a piece of hardware to host multiple operating systems? a. guest operating system b. thick client c. thin client d. hypervisor
d. hypervisor
In Fedora 20, what journaling database system has replaced the logging system used to record the messages normally stored within the boot.log, messages, and syslog files? a. systemd b. messaged c. logd d. journald
d. journald
Nicholas wants to verify whether a file is a hard link to a file within the same directory. Which of the following commands could he use to see information that would be helpful to make this determination? a. ls -s b. ls -l c. ls -al d. ls -i
d. ls -i
Which of the following commands will display the contents of the /etc/passwd file in alphanumerical order? a. cat --sort /etc/passwd b. cat -s /etc/passwd c. sed /etc/passwd d. sort /etc/passwd
d. sort /etc/passwd
Which of the following commands will prompt you to answer a series of questions to help determine which time zone file you should use? a. zones b. timezones c. zoneselect d. tzselect
d. tzselect
An alias has previously been created named showauth. Which of the following commands can be used to get rid of that alias? a. alias -d showauth b. ualias shoauth c. noalias showauth d. unalias showauth
d. unalias showauth
How many times will the following loop execute as part of a script: #!/bin/bash COUNTER=0 while [ $COUNTER -lt 7 ] do echo "hello world" done a. 0 b. 1 c. 7 d. until ctrl-c is used to terminate it
d. until ctrl-c is used to terminate it