Exam 2 practice NETW 110 INTRO to UNIX

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which of the following is the common escape sequence to display a horizontal tab using the echo command?

\t

Select the command that can be used to change the root filesystem to a different directory, such as when you are in a rescue environment.

chroot The chroot command allows you to change the root of the live OS to the /mnt directory, which is actually the / (root) filesystem on the local disk.

Which of the following commands will show the current user cron jobs that have been created for the currently logged in user?

crontab -l

Which of the following commands will show a list of process names along with their process ID (PID)? (Choose two.)

ps top

What command is used to display the lineage of a process by tracing its PPIDs until the init daemon?

pstree (The pstree command displays the lineage of a process by tracing its PPIDs until the init daemon.)

Which of the following characters, when pressed while the top program is running, will allow you to change the niceness of a process?

r

While the top command is running, what key can be pressed to change the nice value of a process?

r

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?

#

Which of the following entries could be added to the rsyslog.conf configuration file to have all syslog messages displayed to console 10?

*.* /dev/tty10

Which of the following options can be used with the usermod command to change the description of the user account that is stored in the GECOS field?

-c The -c option specifies a new description for the GECOS, or description, for the user account.

What option can be used with the ps command to display an entire list of processes across all Terminals, including daemons?

-e

Which of the following can be used for comparing values within an if statement? (Choose two.)

-lt (The -lt statement can be used to determine whether one value is less than another.) = (The = symbol can be used to determine whether two strings are equal.)

Which of the following files can you add filenames to so that the git add * command will not stage them?

.gitignore

The System Log Daemon, rsyslogd, creates a socket for other system processes to write to. What is the path to this socket?

/dev/log

A system administrator wants to allow most users to be able to run cron jobs, but wants to specifically prevent a couple of users from doing so. Which of the following files could the administrator edit to disallow these users from creating cron jobs?

/etc/cron.deny he users that should not be able to run cron jobs should be configured in the /etc/cron.deny file.

In which directory would a system administrator store scripts that should be run monthly by the cron daemon?

/etc/cron.monthly Any scripts placed in the /etc/cron.monthly directory will be executed once every month.

which of the following files is where the default Runlevel is set on some Linux systems

/etc/inittab

Which of the following files is a binary file that contains the rules for calculating the time based on your time zone relative to epoch time?

/etc/localtime

In which file can you configure rules for logging on a Linux system?

/etc/rsyslog.conf

In which of the following directories can you place files that will be copied to new user directories when new users are created?

/etc/skel

What is the path to where the journald.conf file is located?

/etc/systemd/journald.conf

What file in the /proc directory contains information about a computer's CPU?

/proc/cpuinfo The cpuinfo file contains information regarding the processors in the computer.

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?

/proc/meminfo

Where are the files stored that contain information for all of the time zones that could be recognized by a Linux operating system?

/usr/share/zoneinfo

Which of the following files stores information about failed logins on a Linux system?

/var/log/btmp

Where are scheduled commands stored on Ubuntu Linux systems?

/var/spool/cron/atjobs (Scheduled commands are stored in /var/spool/cron/atjobs on Ubuntu Linux systems.)

Which of the following would be the results of running the command seq 7?

1 through 7 being displayed one number per line.

Which of the following is the highest value that can be set for the nice value which would result in a greater chance of a lower priority?

19

Which of the following represents stderr at the command line when used for redirection?

2 The number 2 represents stderr at the command line when used for redirection.

Which of the following will take output from a command and append it to the end of a file?

>> (Two greater than signs will append the output of a command to whatever file is specified after the greater than signs. If the file does not exist, it will create the file.)

Which of the following commands can be used to create a BASH variable named CREATOR with the value of Torvalds?

CREATOR="Torvalds" (no spaces)

Which of the following is the default desktop environment used by Linux Mint?

Cinnamon

If a process state is currently showing as uninterruptible sleep, which letter will show in the output of the ps command?

D A process is in uninterruptible sleep if it is waiting for disk access and will be indicated with the letter D.

Which of the following is an on-screen keyboard used with Linux?

GOK

Which of the following will the split command do on a file when no other options are specified?

It will split a file into new equally sized files that are 1/10th of the original file size. When there are no other options specified, the split command will split a file into new files that are 1,000 lines each.

Which of the following options is passed to the Linux kernel from the GRUB2 configuration file to set the locale?

LANG

Which of the following environment variables can you change the value of to set the default printer on a Linux system? (Choose two.)

LPDEST PRINTER

What file under the proc directory contains information regarding what modules are currently loaded into the Linux kernel?

Modules The directory /proc/modules/ contains information regarding the modules that are currently loaded into the Linux Kernel.

Which kill signal terminates a process by taking the process information in memory and saving it to a file called core on the hard disk in the current working directory?

SIGQUIT

If a Linux installation ends abnormally and the screen displays a fatal signal 11 error, what type of error has occurred?

Segmentation fault The segmentation fault indicates an error when a program accesses an unassigned area in the RAM.

Which of the following does Click Assist do?

Simulates a right click by holding down the left mouse button.

Which of the following accessibility features simulates simultaneous key presses when two keys are pressed in sequence?

Sticky Keys Turning on sticky keys will simulate simultaneous key presses when two keys are pressed in sequence.

Which of the following is a valid Linux initialization process?

SysV Systemd

Which of the following system variables can you modify to override the default system timezone within your current shell?

TZ

Each SCSI device attached to a system must be assigned an ID number. What is this ID number called?

Target ID The target ID or SCSI ID is a unique ID number associated with each SCSI controller and hard disk.

Which of the following does a Linux kernel use to store the value of epoch time?

The number of seconds since January 1, 1970

What is contained in the DISPLAY variable on a Linux system running the X window system?

Which X server the client is supposed to connect to by default.

Which of the following is a lightweight desktop environment that uses very few system resources that a system administrator might choose to install on a Linux server instead of one of the two main desktop environments?

XFCE XFCE is a lightweight desktop environment that uses few system resources.

What is the term for a ZFS managed filesystem that is created from ZFS pools?

ZFS volume The ZFS volumes are Zettabyte File Systems (ZFS)—managed filesystems that are created from ZFS pools.

Levi wants to run 5 commands sequentially, but does not want to create a shell script. He knows that each command is going to take approximately 20 minutes to run individually. However, he would like to go to lunch 15 minutes from now. He knows that he can type all of the commands on the same line and separate them with a certain character to run them sequentially. Which character can he type after each command to have them run one after the next without requiring further input from him?

a semicolon

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?

alias showauth='tail -f /var/log/auth.log'

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?

at

Which of the following command can be used to remove a job from the list of pending jobs? (Choose all that apply.)

at -d (The -d option is an alias for the atrm command.) at -r (The -r option is an alias for the atrm command.) atrm

Which of the following commands will display a list of the pending jobs to be run? (Choose all that apply.)

at -q atq at -l

Which of the following results would be created by the command sequence: echo 'apple banana carrot dog elephant' | while read a b c; do echo result: $c $b $a; done

carrot dog elephant banana apple the read command will read apple Into A ; Banana into B ; the rest into C. when displayed in reverse order, C is first, then B then A

which of the following commands will send the output of the cat command to the grep command to be filtered

cat /etc/passed | grep jsmith

Which of the following commands will send the output of the cat command to the grep command to be filtered?

cat /etc/passwd | grep jsmith (The | (pipe) symbol will send the output of one command to another.)

Which of the following will display the contents of the /etc/shadow file?

cat /etc/shadow getent /etc/shadow

Which of the following will show account aging information for a user such as the date of the last password change, when the password expires, and the number of days of warning before the password expires?

chage -l jsmith

You have run the top command successfully, but realize that the q key on the keyboard has suddenly stopped working. What is another way that you can exit out of the top program?

ctrl-c (The ctrl-c key combination sends the SIGINT kill signal and will exit out of the top program.)

Which of the following commands can be used to pause a printer named Printer1?

cupsdisable Printer1

Which of the following commands will display the number of seconds that have elapsed since January 1, 1970?

date +%s

Which command should you run after installing a new kernel module to update the module dependency database?

depmod

Which of the following commands will display messages that were displayed during the boot sequence by the kernel?

dmesg

Which of the following is the log file where Dandified YUM writes its log entries?

dnf.rpm.log

Which of the following is the log file where the Debian Package Manager writes entries for actions taken and packages installed?

dpkg.log

Which of the following commands will display the exit status of the last command used in the BASH shell?

echo $?

You have just created a variable named CREATOR. Which of the following commands will display the contents of the variable to standard output?

echo $CREATOR Though you do not use the dollar sign to create the variable, you do use a dollar sign to display the variable contents using the echo command.

After a background process has been started, what command below can be used to move it to the foreground?

fg

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?

fg

Which of the following commands should you use to specify that you want to use Git for version tracking on them?

git add The git add command will start using git for version tracking on the files specified.

Which command can be used to download an updated copy of the master branch from the original Git repository?

git pull origin master The git pull origin master command can be used to download an updated copy of the master branch from the original Git repository.

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?

grep root /etc/passwd | tee ~/root.txt The output of the grep command is sent to the tee command, which displays the output to the screen while simultaneously writing it to a file.

Which of the following commands can be used to remove a group from a Linux system? (Choose all that apply.) Group of answer choices

groupdel delgroup

Which of the following commands can a user run to display the groups that they are a member of?

groups

Which of the following can be used to compare the hardware clock to the system clock, writing a new result to a new line every 10 seconds?

hwclock -c The hwclock -c command can be used to compare the hardware clock to the system clock, writing a new result to the display every 10 seconds.

Which of the following is a type of software that allows a piece of hardware to host multiple operating systems?

hypervisor (A hypervisor is a type of software that allows multiple operating systems to run as guest operating systems on a single piece of hardware. They come in type 1 and type 2 versions.)

Which of the following commands can be used to convert files between different character encodings?

iconv

Which of the following constructs can be used in a shell script to determine whether two values are equal and if so run another set of commands?

if The if construct can be used in a shell script to determine whether two values are equal and if so run another set of commands.

What file in the /proc directory contains a list of memory address ranges reserved for device use?

ioports

Which of the following commands can be used to only show jobs that have been paused.

jobs -s

Which of the following commands can you use to view events within the journald database?

journalctl

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?

journald The journald is a database system to store systems events. It is included in modern Linux systems such as Fedora 20. The systems events can be seen by calling the journalctl command.

Which of the following log files contains information and error messages generated by the Linux kernel?

kern.log

Which of the following will invalid entries in the GRUB2 configuration cause?

kernel panic and halt the system

Which of the following commands will send a process's resources to /dev/null to kill the process for process ID 1357?

kill -9 1357

In order to create and manage KVM or Qemu virtual machines, a Linux system must have which of the following installed?

libvert

Which of the following commands will show a number of environment variables that start with LC_?

locale

Which of the following commands can be used to display the current locale of a system? (Choose two.)

locale localectl

Which of the following two commands can be used to add custom log file entries to the journald database? (Choose two.)

logger systemd-cat

Which of the following commands can you use to send a print job to printer1?

lp -d printer1 mydocument.txt (The lp command, as part of the CUPS printing system, can use the -d option to set the destination printer as printer1 followed by the filename that you want to print.) lpr -P printer1 mydocument.txt

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?

lpoptions -d printer1

Which of the following commands will display the print jobs in the print queue for printer1 only?

lpstat -o printer1

Which of the following commands can be used to terminate a process by the process name?

pkill

Which of the following commands can be used to display general hardware information for the entire system?

lshw The lshw command displays general hardware information for the entire system.

Which of the following commands can be used to see files that are currently being used by a specific process ID (PID)?

lsof

A government office wants to secure a few of its Linux systems so that they can only use certain USB devices. After plugging in a USB device, which of the following commands could be used to detect certain identifying information that can be used to only allow that type of USB device?

lsusb The lsusb command will display individual USB device information that can be used to limit the USB devices allowed on a Linux system.

Which of the following commands can be used to create and manage a software RAID configuration after installation?

mdadm The mdadm command can be used to create and manage a software RAID configuration after installation.

What command is used to manage a software RAID configuration after installation?

mdadm The mdadm command is used to manage a software RAID configuration after installation. The mdadm command is the tool most Linux distributions use these days to manage software RAID arrays.

Which of the following files holds the configuration information for GRUB Legacy on Ubuntu Linux systems?

menu.lst

The subdirectory newdir does not currently exist in the current directory that you are in. Which of the following commands will create a new directory named newdir and then change into that directory? (Choose two.)

mkdir newdir && cd newdir mkdir newdir; cd newdir

Which of the following commands will generate a new initramfs?

mkinitrd dracut

Leonard wants to find detailed information about the Bluetooth kernel module. Which of the following commands can he use to display this information?

modinfo bluetooth

Which of the following is the default window manager used by the GNOME version 3 desktop environment?

mutter

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?

nl /etc/passwd The nl, or number lines, command will display the contents of a file along with a line number to the left side of each line within the file.

Which of the following virsh commands will display the total amount of memory as well as the amount of free memory for a node?

nodememstats The nodememstats command will display total, free, buffers, and cached memory amounts within the virsh command shell.

Which of the following can be used preceding a command to prevent a process from terminating when the parent process terminates?

nohup (The nohup, or no hangup, command can be used preceding a command to prevent it from terminating when the parent process terminates.)

Which of the following can be included in a shell script to ask the user to type in a password and then store it in the variable named $password?

read -s -p "Please enter the password: " password

Which of the following commands will show the current runlevel along with the previous runlevel? (Choose all that apply.)

runlevel

Which of the following commands will count down from 10 to 1?

seq 10 -1 1

Which of the following commands will shut down a Linux system? (Choose all that apply.)

shutdown -h now telinit 0 poweroff

Which of the following commands will display the contents of the /etc/passwd file in alphanumerical order?

sort /etc/passwd

Which of the following is a valid method of running a script named myscript.sh? (Choose two)

source myscript.sh (The source command will run a file provided as a parameter as a script in the current shell.) ./myscript.sh

Which of the following is a virtual filesystem that is made up of virtual files that a Linux operating system is able to export information to about kernel sub-systems, hardware devices, and device drivers to make it easy for users to access the information?

sysfs

Which of the following commands will set the default runlevel of a Linux system?

systemctl set-default runlevel5.target The set-default option can be used for the systemctl command to set the default runlevel.

Which of the following commands will display a list of Systemd units sorted by the time they took to load?

systemd-analyze blame The system-analyze blame command will display a list of Systemd units sorted by the time they took to load.

Which of the following commands will list the time zones available on a Linux system?

timedatectl list-timezones

which of the following commands will list the time zones available on a Linux system?

timedatectl list-timezones

Which of the following options can be specified in the GRUB Legacy configuration file to set how long the boot menu is displayed before loading the default image?

timeout The timeout option can be configured to display the boot menu for the desired amount of time before choosing a default image to boot.

Which of the following commands will prompt you to answer a series of questions to help determine which time zone file you should use?

tzselect

An alias has previously been created named showauth. Which of the following commands can be used to get rid of that alias?

unalias showauth The unalias command can be used along with the name of the alias to remove an alias from a system.

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

until ctrl-c is used to terminate it The script is missing a line to increment the counter after echoing hello world, which means the counter will remain at 0 in an infinite loop until it is terminated.

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?

upstart Upstart is a replacement for the init daemon. It is responsible for starting tasks and services during boot, stopping them during shutdown, and supervising them while the system is running.

Which of the following commands can be used to delete a user account?

userdel

Emily accidentally created a new user account on the wrong server. Which of the following commands could she use to delete the account she created? (Choose all that apply.)

userdel deluser

Which of the following commands can be used to set the number of days until user account jsmith with an expired password is disabled?

usermod -f 15 jsmith

Which of the following is the first field of the /etc/passwd file?

username

On a system using the KVM hypervisor, which of the following modules would you expect to see as part of the output of the lsmod command on a guest Linux virtual machine?

virtio

Which of the following commands can be used to schedule very frequent recurring tasks, such as running once every minute?

watch

Which of the following commands will count the number of lines in a file named data.csv?

wc -l data.csv (The wc command can be used to count characters, words, or lines. When no options are specified, it will return all three. If the -l option is specified, it will return only the number of lines.)

Which of the following is a special group that provides its members with the ability to run the su and sudo commands?

wheel (The wheel group is a special group whose purpose is to provide its members with the ability to run the su and sudo commands.)

Which of the following states describe a process that is waiting for a parent process to release its PID?

zombie A process that is waiting for a parent process to release its PID is said to be a zombie process.

If incompatible X Windows settings are configured, where will the errors that are generated be written to?

~/.xsession-errors


Ensembles d'études connexes

Chapter 5 Eukaryotic Cells and Microorganisms

View Set

5.3.11 Practice Questions Test out

View Set

Unit exam #3: 45, 47, 41, 44, 48, 49

View Set

Disseminated Intravascular Coagulation

View Set

Individual Income Tax Computation Chapter 8

View Set

La gestion des carrières dans les organisations

View Set