IT340 Exam Review

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What is the purpose of an alias in bash?

It creates a new (typically shorter) name for a command.

What is the primary function of /etc/resolv.conf?

It holds the IP addresses of up to three DNS servers that Linux may use.

Compose a command that will find where the xarg file is located on your system. You may use any of the commands that we used in lab.

locate ./xarg or find ./xarg or whereis ./xarg

Compose a command to set a password on the tjones account (assume that you have root access)

passwd tjones

Which of the following lines identifies a bash script, when placed at the start of a file?

#!/bin/bash

Compose a command that will set the permissions on the file myfile to give the owner read, write and excute, the group read and write, and everyone else just read

================ Scrap paper: User: rwx or 111 or 7 = Group: rw- or 110 or 6 = All Users: r-- or 100 or 4 = ================= Command: chmod 764 myfile

What will the command 'cat first.txt second.txt > test.txt' do? A. It will combine the contents of first.txt and second.txt in the test.txt file B. It will display the contents of the first.txt and second.txt files to the screen C. None of the choices are correct D. It will create 2 new files that contain the contents of first.txt and second.txt respectively E. It will not do anything

A. It will combine the contents of first.txt and second.txt in the test.txt file

Compose a command to delete the /home/student/mydir directory, assuming that there are no files in it.

Executing from root (/): rmdir /home/student/mydir It may ask you to confirm it with [y] or [n]. Press [y] to confirm the deletion.

Compose a command to copy all of the files in the /home/student directory to the /home/student/mydir directory

cp /home/student /home/student/mydir

As an ordinary user, typing /sbin/ifconfig produces information about your network interfaces, but typing ifconfig produces a command not found error message. Why? A. /sbin is not on your path, so bash can't find it without a complete path specification. B. The ifconfig program file is located in /bin, not in /sbin. C. A library upon which ifconfig relies has not been properly installed. D. ifconfig refuses to run for ordinary users as a security measure.

A. /sbin is not on your path, so bash can't find it without a complete path specification. [When you type a command without a complete path, bash searches directories defined by the PATH environment variable to find that command's program file. If bash can't find a matching command, it presents a command not found error message. Thus, it's safe to conclude under the conditions of the question that /sbin isn't in your path.]

Typing host tycho.luna.edu produces a response with the IP address 10.27.109.201, but typing ping tycho.luna.edu produces a series of Destination Host Unreachable messages. What can you rule out as a cause of the problems with ping? A. An unresponsive DNS server B. A faulty ethernet connection C. A network cable unplugged from tycho.luna.edu. D. A failure of tycho.luna.edu's router

A. An unresponsive DNS server [The fact that the host command returned an IP address means that either you didn't need a Domain Name System (DNS) server to convert the hostname into an IP address or your network's DNS server is working correctly.]

If you use the touch command and a file already exits with that name, what will happen? A. The file timestamp will be updated to the current time B. None of the choices are correct C. The file will be overwritten D. Nothing will happen E. The file permissions will be updated to the current permissions

A. The file timestamp will be updated to the current time

What options must you pass to userdel to keep it from deleting a user's home directory when called? A. -r B. None; userdel doesn't delete the user's home directory by default C. --nodel D. --preserve

B. None; userdel doesn't delete the user's home directory by default

Why might a script include a variable assignment like CC="/usr/bin/gcc"? A. The variable can be easily changed or assigned different values, increasing the utility of the script B. Because some programs can't be called from scripts except when referred to by variables C. To ensure that the script uses gcc rather than some other C compiler D. The variable assignment allows the script to run the program even if it lacks execute permission

A. The variable can be easily changed or assigned different values, increasing the utility of the script [You can easily edit that line to change the program run by the $CC variable, or you can assign different values to the variable within a conditional in support of different system configurations. Specifying the program directly will as easily ensure that it's run. Any program that can be called from a variable can be called directly. Variable assignment doesn't allow the script to call programs for which the user lacks execute permission.]

Which of the following is true of "privileged" ports? A. Their numbers are below 1024. B. Their numbers are above 512. C. Their numbers are below 512. D. Their numbers are above 1024.

A. Their numbers are below 1024. [Privileged ports have numbers below 1024, while unprivileged ports are those above 1024.]

You try to use the rpm command to install newpackage-2.7-2.i386.rpm on a Fedora Linux computer, but you're met with a message to the effect that this package depends on several other packages that aren't installed. How can you resolve this problem? A. Track down the missing packages and install them using rpm, then install newpackage B. Use dpkg, rather than rpm, to install newpackage C. Use inpkg, rather than rpm, to install newpackage D. Submit a bug report and wait for the developers to release a new package

A. Track down the missing packages and install them using rpm, then install newpackage. [Missing dependencies are best handled by installing them. This can be done manually.]

What time standard does Linux use internally for most timekeeping (time stamps on files, for instance)? A. UTC B. US East coast time C. Local time D. Local time

A. UTC [Linux keeps time internally using Coordinated Universal Time (UTC), which is closely related to Greenwich Mean Time (GMT), or the time in Greenwich England. When Linux displays times, as in long directory listings, it "translates" the time to local time using your time zone setting]

While editing a file in Vi, you're called away. When you return, you can't recall which of Vi's three modes you're in. How can you return to a known mode? A. Press the F1 key B. Press the Esc key C. Type :wq D. Type mode: edit

B. Press the Esc key [Pressing the Esc key always returns Vi to command mode]

Which of the following commands will display the contents of the $PATH environment variable from a bash shell? A. echo $PATH B. envar $PATH C. display $PATH D. shell $PATH

A. echo $PATH [The echo command echoes its arguments to the display. When it's given an environment variable, it echoes the value of that variable.]

You want to temporarily add the directory /usr/local/tempbin to the list of directories Linux searches for commands. What would you type at a bash prompt to accomplish this goal? A. export PATH=$PATH:/usr/local/tempbin B. PATH=$PATH+/usr/local/tempbin C. PATH=/usr/local/tempbin D. export PATH=/usr/local/tempbin

A. export PATH=$PATH:/usr/local/tempbin [This displays the correct command (export) and syntax to change the PATH environment variable as specified.]

If you wished to look at the first 25 lines only of the file 'test.txt', which command is correct? A. head -n 25 test.txt B. head -c 25 test.txt C. tail -c 25 test.txt D. cat test.txt E. None of the choices are correct

A. head -n 25 test.txt

You've changed the default runlevel to 3 by editing /etc/inittab. Which command could you type to change the current runlevel to 3? (Choose all that apply.) A. init 3 B. init 1 C. init 0 D. init 6

A. init 3 D .init 6

You've compiled and installed an obscure library (obscurelib) from source code to support a program you've already installed. Assuming the library files have been installed in a directory that's already on your library path, what command do you need to type to ensure that the new library will be available to programs? A. ldconfig B. ld_library_path C. hashlib D. ldd obscurelib

A. ldconfig [The ldconfig command tells Linux to re-examine its library path in order to make all the libraries on that path accessible to programs.]

Which of the following commands will mount the /dev/sdb1 partition on the directory /home/mymount? A. mount /dev/sdb1 /home/mymount B. mount sdb1 mymount C. mount /home/mymount sdb1 D. mount /home/mymount /dev/sdb1 E. None of the choices are correct

A. mount /dev/sdb1 /home/mymount

Which of the following commands will send the output of the 'ps aux' command to the input of the 'grep init' command A. ps aux | grep init B. ps aux < grep init C. ps aux $ grep init D. ps aux > grep init E. None of the choices are correct

A. ps aux | grep init

What command can you use in a pipe to create two copies of standard output from a program, one going to a file and the other going to the screen? A. tee B. make C. ifdef D. fork

A. tee [The tee command fulfills the stated purpose. It's used as the second command in a pipe, as in ls | tee ls-out.txt, which both displays the output of the ls command on the screen and saves it to ls-out.txt]

You want to give ownership of a file you've created to another user. What must you do before you can do this with chown? A. Place the file in a directory owned by the target user. B. Place the file on an ext2 filesystem C. Acquire root privileges. D. Ensure that the target user has read access to the file.

C. Acquire root privileges. [Only root may change the ownership of files.]

Which of the following directories is least likely to be shared via NFS? A. /home B. /etc C. /opt D. /usr/X11R6

B. /etc [The /etc directory contains unshareable data—namely, configuration files that are specific to one computer. The /opt directory holds static add-on program files, which might reasonably be shared with other systems; /usr/X11R6 also holds static program files that are potentially shareable; and /home normally holds users' variable data files, which are often shared.]

Which of the following octal file permissions represents read and write access for the owner, read access for the group, and no access for anybody else? A. 664 B. 640 C. 420 D. 421

B. 640 [Read, write, and execute permissions are represented by bits in a three-bit (octal) number; read is 4, write is 2, and execute is 1. These numbers may be added in each position of the three-digit octal number showing owner, group, and world permissions. Thus, read and write permission for the owner is 4+2=6; write permission for the group is 4; and no permission for anybody else is 0, for a final octal permission of 640.]

What is a disadvantage of using pool.ntp.org as your NTP time source, vs. using a time source provided by your ISP? A. The NTP pool servers should only be used by large sites (say, those with 100 or more clients). B. A randomly-selected NTP pool source is likely to be further from you than your ISP's NTP server. C. The NTP pool servers don't work properly with some recent versions of the Linux NTP software. D. The NTP pool servers work only on a trial basis; you must pay $10 a year to use them in the long term.

B. A randomly-selected NTP pool source is likely to be further from you than your ISP's NTP server. [The closer an NTP server is to you in a network sense, the less error there will be in setting your time from it. Since your ISP's NTP server is likely to be close to your computer, it's likely to be good on this score; but using pool.ntp.org means your source NTP server could be anywhere on the planet.]

Which of the following is a major problem that advanced package management systems solve? A. Consistent naming of files across distributions B. Identification of conflicts between files and packages C. Quick and easy installation of new program files D. Use of the same source code across OSs

B. Identification of conflicts between files and packages [Package file databases help to identify conflicts. Different distributions may still use different names. Even simple tarballs allow for easy installation of program files and source code use across multiple OSs.]

From a root account, you type the command: 'rpm -ivh mypackage.rpm'. What will the command do (assuming that the package is in your current directory) A. None of the choices are correct B. If the package is valid and isn't already installed, it will be installed C. If the package is installed, it will be uninstalled D. It will be compiled into a binary RPM E. Any previous versions of the package will be replaced or upgraded

B. If the package is valid and isn't already installed, it will be installed

What does the pwd command do? A. It summarizes available disk space on your partitions. B. It displays the name of the current working directory. C. It performs defensive checks of a password. D. It creates a password-protected directory.

B. It displays the name of the current working directory.

Which of the following is not a task you might want cron to perform? A. Rotate log files B. Launch a GUI word processor C. Remove long-unused files from /tmp D. Check for security breaches with Tripwire

B. Launch a GUI word processor [The cron utility runs programs automatically at a future time. It's best used to handle tedious and easily automated tasks, such as removing stagnant files from areas that are intended for temporary storage, rotating log files, and checking system security using automated tools. Running interactive GUI programs, such as word processors, is not something you'd normally do with cron.]

Which of the following statements are true regarding fonts? (select all that apply) A. Bitmap fonts consume less storage space B. None of the choices are true C. Vector fonts use the most storage space D. Vector fonts do not scale to other sizes well E. Bitmap fonts give the highest quality display

B. None of the choices are true

You type head -n 20 logfile.txt to review a log file created by an application. What is the result of typing this command? A. The first 20 lines of logfile.txt that contain the string head are displayed on the screen. B. The first 20 lines of logfile.txt are displayed on the screen. C. The last 20 lines of logfile.txt are displayed on the screen. D. Log entries from logfile.txt with a priority weight of 20 or greater are displayed on the screen.

B. The first 20 lines of logfile.txt are displayed on the screen. [The head utility displays the first few lines of the input file—the first 10 lines by default, but the -n option enables you to change the number of lines displayed.]

You type ps -lx and find that the PPID value for xv is 17047. What does this fact mean? A. The process ID of the ps process was 17047 B. The process with ID 17047 forked xv C. The process ID of xv is 17047. D. The xv process forked a process with the process ID 17047.

B. The process with ID 17047 forked xv [PPID stands for parent process ID; it's the PID of the specified process's parent. Parent processes fork child processes.]

Why might you examine the /proc/interrupts file? A. To learn what maintenance is scheduled on the computer. B. To learn what IRQs are in use on your computer. C. To learn why the load average is so high on the computer. D. To learn what programs have been recently terminated.

B. To learn what IRQs are in use on your computer. [The /proc/interrupts file holds information on hardware interrupt requests (IRQs) used by your computer hardware. This file has no information that relates directly to program termination, scheduled maintenance, or load average, although of course hardware misconfiguration involving interrupts could lead to such problems.]

You type ps ax to view the processes running on the system, but the output is too long to fit on your screen. How might you redirect the output to a file so that you can study it in a text editor? A. Type redir 'ps ax' psax.txt B. Type ps ax > psax.txt C. Type ps ax | psax.txt D. Type redir psax.txt 'ps ax'

B. Type ps ax > psax.txt [This is the correct syntax for redirection.]

After a power outage, the miniprog program begins misbehaving, so you suspect that a critical miniprog file may have been damaged. How might you check for such damage on a system that uses RPM for package management? A. Type rpm -Uvh miniprog B. Type rpm -V miniprog C. Type rpm -q miniprog D. Type rpm -e miniprog

B. Type rpm -V miniprog [The -V option to rpm verifies a package, revealing files that are missing or that have been changed since installation. If this check reveals problems, you can then uninstall and reinstall the package using other commands.]

How can the /proc filesystem be helpful in troubleshooting system problems? A. The /proc filesystem holds log files that can contain useful error messages from the kernel, servers, and other programs. B. You can deliberately fill the /proc filesystem with null data using dd. If the system crashes, you know your problems are hardware-related; if it doesn't, you know the problem is in software. C. You can consult /proc pseudo-files to learn what hardware Linux has detected and how it's configured. Unexpected values point to potential sources of problems. D. When you copy all the files in /etc to /proc/etc, the system generates a report on configuration errors in /proc/errors. This report contains helpful troubleshooting information.

B. You can deliberately fill the /proc filesystem with null data using dd. If the system crashes, you know your problems are hardware-related; if it doesn't, you know the problem is in software. [The /proc filesystem serves as an interface to metadata about hardware and processes. The files it contains provide information on the installed hardware, hardware configuration, and so on, and thus can be useful in troubleshooting. Because /proc doesn't correspond to a disk partition, you can't fill it with data, and doing so is pointless. Most log files reside in the /var/log directory, not in /proc.]

Which command will redirect the contents of a file named 'one' to a text file in your current directory? A. cat one < one.txt B. echo $one > one.txt C. echo $ONE > one.txt D. echo one | one.txt E. None of the choices are correct

B. echo $one > one.txt

You perform maintenance on a computer that required you to take down its network interface (eth0). You now want to bring its network interface back up using its preconfigured defaults. What command could you type to accomplish this goal? A. iwconfig eth0 B. ifup eth0 C. netstat eth0 D. ifconfig eth0

B. ifup eth0 [The ifup command is a script that runs a series of other commands to bring up a network interface using settings that are stored in configuration files.]

How do you start a process (myprocess) in the background? A. & myprocess B. myprocess & C. None of the choices are correct D. ps myprocess E. top myprocess

B. myprocess &

Which of the following statements is false? A. nice may be used to lower a process priority before it's execution begins B. nice may used to increase a process priority C. None of the statements are false D. renice may be used to lower the priority of a running process E. Process priority cannot be increased once a process has been started

B. nice may used to increase a process priority

You want to print a plain-text (ASCII) file, but you want to include line numbers and page numbers in your printout. What tool can you use to add these features prior to printing the file? A. nm B. pr C. wc D. gs

B. pr

Which of the following daemons handles traditional logging from servers and other user-mode programs? A. init B. syslogd C. kyslogd D. sysklogd

B. syslogd [The sysklogd package actually contains two daemons: syslogd and klogd. The former handles traditional logging from servers and other user-mode programs, while the latter handles the logging of kernel messages. The init process keeps other services up and running but does not natively handle logging.]

Which utility can you use to determine the CPU load at any given moment? A. free B. uptime C. df D. ps

B. uptime [You can determine the CPU load at any given moment by using uptime. The three load average values shown correspond to CPU use over the past 1, 5, and 15 minutes, in that order.]

Which of the following ports should you not block on a system that functions as a public Web server? A. 25 B. 23 C. 80 D. 137

C. 80 [Web servers conventionally operate on TCP port 80, so you shouldn't block this port on a public Web server. Port 23 is conventionally assigned to Telnet, port 25 to the Simple Mail Transfer Protocol (SMTP), and port 137 to the NetBIOS Name Service.]

Which of the following systems is the earliest one in the boot sequence of a typical x86 or x86-64 Linux computer? A. init B. bash C. BIOS or EFI D. GRUB

C. BIOS or EFI [The Basic Input Output System (BIOS) or Extensible Firmware Interface (EFI) is encoded as firmware on the computer's motherboard. When it powers up, the CPU searches for boot code that's stored in the firmware (BIOS or EFI), so it's the first software to be executed. The firmware then searches its boot devices for a boot loader, such as the Grand Unified Bootloader (GRUB), so it would be next in line. The boot loader ultimately loads the Linux kernel, which in turn launches the init process. A Linux computer might never launch a bash process, since this is a text-mode command shell; some users prefer other shells or may work exclusively from a GUI environment. If bash is run, though, it will run after init]

What does the renice program do? A. It finds and terminates programs that consume too much CPU time B. It searches for security breaches by local users C. It changes the priority of a running process D. It optimizes programs' executables so they consume less CPU time

C. It changes the priority of a running process [The renice program alters the priority of running programs, enabling you to make a program consume less CPU time. (The root user may also use renice to reconfigure a program to consume more CPU time.) The other descriptions are all fictitious.]

Why might you select ReiserFS rather than ext2fs when installing Linux? A. ReiserFS supports larger partition and file sizes than does ext2fs. B. ReiserFS partitions may be resized with the GNU Parted utility. C. ReiserFS is a journaling filesystem that has shorter startup times after a power failure. D. ReiserFS is an older and more stable filesystem than is ext2fs.

C. ReiserFS is a journaling filesystem that has shorter startup times after a power failure. [Journaling filesystems, including ReiserFS, ext3fs, ext4fs, XFS, JFS, and Btrfs, recover more quickly than do traditional filesystems like ext2fs after a power failure or system crash. ReiserFS is actually a newer filesystem than ext2fs is, and it has the same or smaller partition and file size limits than ext2fs does. Both ReiserFS and ext2fs partitions may be resized with GNU Parted.]

Which of the following statements are correct with regard to starting the X server? (select all that apply) A. None of the choices are correct B. The X server may be started by running the init 3 command C. The X server may be started with the command startx D. The X server may be started by running the init 1 command E. The X server may be started by booting to a runlevel that has the GUI enabled

C. The X server may be started with the command startx E. The X server may be started by booting to a runlevel that has the GUI enabled

What symbol denotes the start of a line in a regular expression? A. The dot (.) B. The vertical bar (|) C. The carat (^) D. The dollar sign ($)

C. The carat (^)

Which of the following methods will safely power down the computer? (Select all that apply.) A. None of the choices are correct B. Typing shutdown -r now as root. C. Typing init 0 as root. D. Typing shutdown -h now as root. E. Pushing the power button on the computer's case.

C. Typing init 0 as root. D. Typing shutdown -h now as root.

Select the example that shows the correct use of the 'kill' command to end a process: A. kill -h myprocess B. kill -0 myprocess C. kill -9 myprocess D. kill myprocess E. None of the choices are correct

C. kill -9 myprocess

How do nice and renice differ? A. nice modifies the priority of a program by PID number; renice modifies the priority of a program by process name B. nice may increase or decrease a process's priority; renice may only decrease a process's priority C. nice modifies the priority of a program when you launch it; renice modifies the priority of a program that's already running D. nice may be used by ordinary users or by root; renice may be used only by root

C. nice modifies the priority of a program when you launch it; renice modifies the priority of a program that's already running [When using nice, you don't specify a PID number, since one doesn't yet exist; and renice can take a PID number, a username, or a group name as options, but not a process name.]

Which process will show you only the processes that are consuming the MOST cpu time on your system? A. None of the choices are correct B. echo C. top D. ps E. nice

C. top

Which of the following commands can provide information that will help you identify programs that consume too much CPU time? A. uptime B. df C. top D. cat /proc/cpuinfo

C. top [Typing top provides a dynamic display of processes, by default sorted according to CPU use. Therefore, CPU-hogging processes appear at the top of the top listing.]

What file do you edit to tell Linux what DNS servers to use, if you use static IP addresses? A. /etc/nameservers B. /etc/nameservers.conf C. /etc/dns.servers D. /etc/resolv.conf

D. /etc/resolv.conf [The /etc/resolv.conf file contains lines of the form nameserver address, where address is an IP address. Each line specifies one DNS server.]

You have been told that a special project must be completed. In order for that project to get done, TFTP (Trivial File Transfer Protocol) traffic must be allowed through the firewall. Which port should you enable for TFTP? A. 23 B. 389 C. 143 D. 69

D. 69 [TFTP uses port 69 by default. Port 23 is used by Telnet, while port 143 is used by IMAP 2, and port 389 is used by LDAP.]

Where may users' home directories reside? A. In any directory that resides on its own partition B. Only in the /home directory C. Only in the /users directory D. In any directory that can hold normal files

D. In any directory that can hold normal files. [Users' home directories hold their personal data files, including files they explicitly create and configuration files for the programs they run. The home directory is specified as part of the account information in /etc/passwd, and can be just about anywhere, as long as normal files can exist in the directory. Although /home is the traditional location for home directories, this isn't the only possible location. Many system administrators place home directories on a separate partition, but this configuration is not required.]

Which of the following commands will create three zero length files in your current directory? A. None of the choices are correct B. touch one/two/three C. touch onetwothree D. touch one?two?three E. touch one, two, three

E. touch one, two, three

Which of the following statements are true of SSH?

Encryption makes SSH safer than Telnet.

You want to install Linux on a BIOS-based computer that already boots several OSs using the System Commander boot loader. Where should you install GRUB if you don't want to disrupt the System Commander configuration? A. In the boot sector of a Linux swap partition B. In the boot sector of a Windows C: drive C. In the MBR of the main hard disk D. In the boot sector of a Linux filesystem partition

D. In the boot sector of a Linux filesystem partition [Installing GRUB in a Linux filesystem partition's boot sector will prevent the Linux boot loader from interfering with your existing boot loader configuration. (You will need to add the Linux partition to the existing boot loader's menu, though.) Installing GRUB in the MBR of the main hard disk will bypass or wipe out any existing boot loader. Installing in the boot sector of a Windows boot (C:) partition will damage that partition's ability to boot. Installing the boot sector in the Linux swap partition will corrupt the swap partition, and swap activity will wipe out the boot loader (if Linux will even activate the corrupt swap partition).]

What can symbolic links do that hard links cannot do? A. Provide easy access from GUI file managers B. Use different names for the link and the linked-to file C. Enforce identical permissions on the link and the original file D. Link files on two different filesystems

D. Link files on two different filesystems [Symbolic links can point across filesystems, enabling you to create links without regard for whether or not the original file is on the same partition as the link.]

A workstation's user prefers KDE over GNOME. Which login manager can this user run to ensure direct login to KDE? A. GDM B. Any of the above C. KDM D. XDM

D. XDM [All of the major login managers (XDM, KDM, and GDM) permit users to log into any environment they like, so long as that environment is installed and working. Thus, any of these login managers will work fine for the specified purpose. (XDM sets the login environment using user configuration files, whereas KDM and GDM both enable the user to select the environment at login time.)]

In your normal login account, dale, you type passwd jennie What will be the effect? A. You'll be prompted to change your password. B. You'll see login information about jennie. C. You'll be prompted to change jennie's password. D. You'll see an error message.

D. You'll see an error message. [The passwd utility is used to change user passwords. A given user's password may be changed only by that user or by root, so when dale attempts to change jennie's password, the passwd utility will display an error message.]

Which of the following commands will display how much space is being used by all users in the '/home' directory? A. df /home B. df -f /home C. du -f /home D. du -s /home E. None of the choices are correct

D. du -s /home

What is the first process that the Linux kernel runs when it boots on most Linux systems? A. None of the choices are correct B. root C. zombie D. init E. dmesg

D. init

What command would you use to remove a print job, numbered 203, from the queue for the brother printer? A. lpc -Pbrother 203 B. lpq 203 -Pbrother C. lpr -r 203 -Pbrother D. lprm -Pbrother 203

D. lprm -Pbrother 203 [The lprm command is used to remove a job from a print queue. It can take several options, such as -P along with a printer queue name and a job number.]

Select the correct command that will install the ext4 filesystem onto a disk partition. A. None of the choices are correct B. mkfs -d ext /dev/sdb1 C. mkfs ext4 /dev/sdb1 D. mkfs -t ext4 /dev/sdb1 E. mkfs ext /dev/sdb

D. mkfs -t ext4 /dev/sdb1

Which of the following commands will prepare a swap partition (/dev/sda7) for use? A. dd if=/dev/zero of=/dev/sda7 B. mkfs -t swap /dev/sda7 C. swapon /dev/sda7 D. mkswap /dev/sda7

D. mkswap /dev/sda7 [The mkswap command is used to prepare a swap partition or swap file for use. The swapon command adds prepared swap space to the currently accessible swap space but doesn't actually prepare a swap partition for use. The mkfs command is analogous to mkswap in some ways, but mkfs prepares a partition or file to hold a filesystem, not swap space.]

What command would you use to only look at the processes that you started and are currently running in the context of your terminal? A. ps aux B. ps -ef C. top D. ps E. None of the choices are correct

D. ps

Which of the following partitions is required for all Linux installations? A. /boot B. /home C. swap D. root (/)

D. root (/) [All Linux distributions require a root (/) partition. Most Linux systems also have /boot and /home directories, but these may exist as subdirectories on the root partition rather than as separate partitions. Most Linux systems have a swap partition, but this isn't strictly required, and you may be able to use a swap file rather than a swap partition.]

You've changed the default runlevel to 3 by editing /etc/inittab. Which command could you type to change the current runlevel to 3? A. telinit S B. telinit 1 C. telinit 0 D. telinit 6

D. telinit 6 [The telinit command accepts a numeric runlevel number, so typing telinit 3 does the job. Typing telinit S brings the system into single-user mode.]

You want to know how many words are in a plain ASCII document, paper.txt. What command could you type to learn this information? A. words paper.txt B. nl paper.txt C. count paper.txt D. wc paper.txt

D. wc paper.txt [The wc command displays counts of the number of newlines, words, and bytes in a text document.]

How many primary partitions may you create using fdisk on a disk drive that uses the MBR? A. 1 B. 8 C. None of the choices are correct D. 16 E. 4

E. 4

Which of the following statements is correct regarding the boot process? A. The BIOS contains the bootloader of the installed operating system B. The init process is created based on another running process C. Linux cannot be booted from a network D. None of the choices are correct E. If problems are encountered during boot, the user may boot into 'single user mode' to fix them

E. If problems are encountered during boot, the user may boot into 'single user mode' to fix them

What mount point should be associated with the 'swap' partition? A. /var B. /boot C. / D. /swap E. None of the choices are correct

E. None of the choices are correct

What file controls how filesystems are mounted at boot time? A. inittab B. None of the choices are correct C. mountpoint D. mount E. fstab

E. fstab

The smallest individually addressable area of disk storage is a: A. platter B. block C. track D. None of the choices are correct E. sector

E. sector

What command do you use to retrieve specific types of data from a SQL database?

SELECT

What command can you use in bash to ensure that an environment variable you change will be made available to programs you subsequently launch from that bash session?

The export command.

Which of the following characterize good passwords?

Those that mix upper- and lowercase characters, numbers and symbols.

What are some servers that can enable remote users to log into a Linux computer and run productivity programs?

VNC and SSH servers

In your student account, compose a command to become root that will work on your CentOS VM.

su -

Compose a command to unmount the /dev/sdb1 filesystem from /home/mymount.

umount /dev/sdb1

Compose a command to add the user tjones to your system (assume that you have root access)

useradd tjones


Set pelajaran terkait

Intentional Interviewing Chapter 2

View Set

MKTG 351 Test 3 Cousley (Chapter 14)

View Set

Prep U/ Qs - Chapter 9: Antibiotics

View Set