211 FINAL, DCOm 142 Linux Final Study

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

The string _______, located at the start of the file, identifies a script as a Bash script.

!#/bin/bash

You're writing a script that should accept two arguments, a username and a year, specified in that order on the command line. What variable would you use to access the year?

$2

The symbols which make up the Bash logical and operator is ____.

&&

What option can you pass to groupadd to have it create a group with a GID number of 1027?

--gid 1027

You want to create a new system account for a server program you're installing. What option can you pass to useradd when creating the account to ensure that it's created as a system account?

--system

The ________ qualifier to tar causes it to use xz compression when creating an archive.

--xz

You can type useradd ____ nemo as root to create the nemo account without creating a home directory for nemo.

-M

You can type su _________ command to issue a single command with root privileges.

-c

The user arnold is currently logged in. Despite this fact, you want to delete his account without first logging him off. You don't want to delete arnold's files. To accomplish this goal, you type userdel ___ arnold.

-f

Which options to find can you use to locate files owned by a particular user

-user, -uid

Which options to find can you use to locate files owned by a particular user?

-user, -uid

Which regular expression string matches any sequence of characters of any length?

.*

Which of the following files defines Linux groups?

/etc/group

What file would contain the following: nameserver 8.8.8.8

/etc/resolv.conf

A file has a symbolic mode of -rw-r-----. The file's octal mode is ______

640

You're working in vi and, after having saved your current file, you want to load a new one. You can do so by typing ____ newfile.txt from command mode.

:e

When assigning a value to a variable in a Bash script, you separate the variable from its value with the ____ character.

=

Which of the following redirection operators appends a program's standard output to an existing file, without overwriting that file's original contents?

>>

What type of information can netstat provide?

Answer: A, B, C netstat can provide information on network interfaces similar to what ifconfig provides (option A), routing table data similar to what route provides (option B), and a list of open ports (option C). It can not provide round-trip network packet travel time similar to what ping provides (option D) or the identities of broken routers similar to what traceroute provides (option E).

What term refers to the worldwide system of servers that translates between IP addresses and hostnames?

Answer: B The question describes the Domain Name System (DNS), so option B is correct. The Dynamic Host Configuration Protocol (DHCP) delivers network configuration information to computers when they boot, so option A is incorrect. The Transmission Control Protocol/Internet Protocol (TCP/IP) is the overarching standard used for most networking purposes, so option C is incorrect. IP version 6 (IPv6) is an addressing system that supports immensely more addresses than does the older IPv4, so option D is incorrect. The Secure Shell (SSH) is an encrypted remote login protocol, so option E is incorrect.

What program can you use to manually bring up a network interface in Linux?

Answer: D The ifconfig program does as the question specifies (among other things), so option D is correct. The iwlist command displays information on Wi-Fi networks but does not bring up a network interface, so option A is incorrect. The route command displays or modifies routing tables, but does not bring up a network interface, so option B is incorrect. The telnet command is a remote-access and network diagnostic tool, but it does not bring up a network interface, so option C is incorrect. The traceroute command produces network diagnostic information, but it does not bring up a network interface, so option E is incorrect.

What keystroke deletes a line of text when using nano?

Ctrl+K

A user account's information is linked between the /etc/passwd and /etc/shadow files via the account's UID. (T or F)

F

ASCII is limited to 72 characters (T or F)

F

All Bash scripts must contain functions. (T or F)

F

Even after an account is deleted, its UID number cannot be re-used. (T or F)

F

GUI account management tools provide more options than their text-mode counterparts. (T or F)

F

It's impossible to run a Bash script if it hasn't had an executable bit set on its file. (T or F)

F

The -n option to traceroute causes it to display hostnames rather than IP addresses. (T or F)

F

The /etc/group file supports linking each user to a maximum of one group. (T or F)

F

The /var/log/messages file always holds general-purpose log entries. (T or F)

F

The gzip program generally produces more compact compressed files than does the bzip2 program. (T or F)

F

The host program has been deprecated. (T or F)

F

To save a text file in vi, you should press Ctrl+S. (T or F)

F

Using chmod, you can add world execute permission to a file without modifying any of the file's other permissions. (T or F)

F

WEP provides the highest available level of Wi-Fi security. (T or F)

F

You can record the output of a command in a variable by enclosing the command in backticks. (T or F)

F

dhcpd is a common DHCP client for Linux. (T or F)

F

True or false: WEP provides the highest available level of Wi-Fi security

False: WEP is in fact the worst of the three common levels of Wi-Fi security. WPA2 is the best, with WPA in-between.

True or false: The host program has been deprecated.

False: The host program is actively maintained; it's nslookup that has been deprecated.

Where does the kernel store its ring buffer logs?

In memory

A program allocates more and more memory but doesn't use the memory it allocates (2 words).

Memory leak

What type of information can netstat provide?

Network interface information, a list of open ports, routing table data

Which of the following makes a good password? Your username 'password' Telephone # None of these

None

A caret (^) represents the start of a line in regular expressions. (T or F)

T

A file with permissions of crw-rw-r-- is a character device file. (T or F)

T

A version of the vi text editor called "vi improved," or vim is used for most Linux distributions. (T or F)

T

Both RPM and Debian packages can specify that they require other packages. (T or F)

T

By default, useradd copies a set of user configuration files from /etc/skel when creating a new user account. (T or F)

T

Including the file type code, symbolic links always have permissions of lrwxrwxrwx. (T or F)

T

Linux supports two types of text-mode output to the screen, which you can send to separate files or display devices. (T or F)

T

Pressing the M key in top causes the display to change to sort processes by memory use. (T or F)

T

Setting the SUID bit on a program file that's owned by root causes it to execute with root privileges no matter who runs it. (T or F)

T

Setting the SUID bit on a program file that's owned by root causes it to execute with root. (T or F)

T

The lowest UID number used for user accounts on Linux systems is typically 500 or 1000 (depending upon the distribution). (T or F)

T

The lowest UID number used for user accounts on Linux systems is typically 500 or 1000. (T or F)

T

The ps program enables you to view the process table. (T or F)

T

The who command reveals the remote computer from which users have logged in, when they've logged in remotely. (T or F)

T

nano is an extended variant of pico. (T or F)

T

useradd copies a set of user config files from /etc/skel when creating a new user account. (T or F)

T

Which pieces of information on user accounts is not normally stored in the /etc/passwd file on modern Linux distributions?

The accounts password

What does the permission string -rwxrwx--- mean?

The file's owner and members of its group may both read, write, and execute the file, but other users have no access to it.

The file stuff.txt does not exist. You type nano stuff.txt and press Enter. What happens next?

The nano text editor starts, and displays the message, New File, in the status bar.

Mary finds that she can delete George's files in /tmp. What might this imply?

The sticky bit is missing from /tmp; it should be set

Mary finds that she can delete George's files in /tmp. What might this imply?

The sticky bit is missing from /tmp; it should be set.

In pico or nano, you can paste text that you've cut or copied earlier by pressing Ctrl+____.

U

A text encoding method that can use single- or multiple-byte encodings to store text.

Unicode

What types of information does the id command provide?

Your UID number, Your current group

What types of information does the id command provide?

Your UID, username, current group, all group member

The command _____ :users somefile.txt changes the group affiliation of somefile.txt to users.

chown

The command _______ :users somefile.txt changes the group affiliation of somefile.txt to users.

chown

Which program enable s root to set the ownership of files?

chown

Programs that can look up DNS information include host, nslookup, and _____.

dig

Programs that can look up DNS information include host, nslookup, and ________

dig

Which of the following commands provides a low-level way to install software on a Debian system?

dpkg

What Bash scripting keyword terminates a case statement?

esac

Your network's hardware interface is called eth0. You want to bring up this interface via DHCP, so you type dhclient _____ as root.

eth0

Your network's hardware interface is called eth0. You want to bring up this interface via DHCP, so you type dhclient ________ as root

eth0

You're writing a script that will be called by other scripts. You want to signal abnormal termination of your script by passing a value of 8 to the external script under some circumstances. What command can you use in your own script to do this?

exit 8

A computer's full hostname is franklin.example.org. What is the machine name portion?

franklin

Which of the following programs produces a summary of the memory status of your computer, including the total memory available, the amount used, and the amount that's unused?

free

You want to delete the oldproj group, so you type _____ oldproj.

groupdel

You want to delete the oldproj group, so you type ________ oldproj.

groupdel

What program can you use to manually bring up a network interface in Linux?

ifconfig

The first process to be run by the Linux kernel is normally called ________

init

What keystroke creates a new blank line immediately below the current one, when typed in vi's command mode?

o

You want to test connectivity to tranquility.luna.edu by sending 11 packets to see how many return. To do this, you can type __________ tranquility.luna.edu.

ping -c 11

You want to test connectivity to tranquility.luna.edu by sending 11 packets to see how many return. To do this, you can type ___________ tranquility.luna.edu

ping -c 11

Which of the following tools can you use to identify running processes?

ps, top

What command can you use to retrieve user input into a variable in a Bash script?

read

An Internet site that hosts software that you can install with yum, APT, or a similar tool is known as a ___________

repository

Which methods or commands provide access to superuser privileges for authorized users? (Select all that apply)

su

Default permissions are determined by the _______

umask

To change a current user account's home directory location, you might type _______ -m -d /home/newhome user.

usermod

You can use the ____ command to count the characters, words, and lines in a text file.

wc

You can type _____ command, with no arguments, to learn your current username and nothing more?

whoami

You can type the ______ command, with no arguments, to learn your current username and nothing more?

whoami

Which command would create a zip file containing the files, holiday.tif and desc.txt, and compress it as much as possible?

zip -9 trip.zip holiday.tif desc.txt

You use the ___ character to separate two strings, either of which should match, in an extended regular expression.

|


संबंधित स्टडी सेट्स

Lecture 20: Epidemiology of Infectious Diseases

View Set

EXAM 5 Kidney Disease chapter 57 prep U

View Set

The Assassination of Abraham Lincoln

View Set

Chp.14 Deficit spending and the Public Debt

View Set

BSC 2085C Study Cards ( Chapter 9 )

View Set

AP Gov required cases and documents

View Set