










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
DCOM 142 LINUX FINAL QUESTIONS & ANSWERS
Typology: Exams
1 / 18
This page cannot be seen from the preview
Don't miss anything!











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. - Answers - ping
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. Programs that can look up DNS information include host, nslookup, and _____. - Answers - dig True or false: The - n option to traceroute causes it to display hostnames rather than IP addresses. - Answers - False The statement has it backwards; - n causes traceroute to display IP addresses rather than its default of hostnames. True or false: User ID numbers are linked to usernames in a way that ensures the mapping is identical on all computers. - Answers - False User ID numbers are assigned to usernames in an arbitrary way, so a given username may have different user ID numbers on different computers. True or false: Symbolic links always have permissions of lrwxrwxrwx. - Answers - True The leading l identifies the file as a symbolic link. The remaining characters indicate that all users have full access to the link file, but the linked-to file's permissions are what control what users can actually do with the file. Default permissions are determined by the _____. - Answers - umask You've created a script, sensitive, and you want to be sure that no other ordinary user of the computer can read, write, or execute it, but you must be able to read, write, and execute it. To do so, you type chmod ______ sensitive. (Specify the octal mode.) - Answers - Answer: 700 What does the permission string - rwxrwx--- mean? - Answers - C Option C correctly summarizes the meaning of the specified permission string. The description in option A would be represented by - rwx------, which is not the string shown in the question. Option B would be correct if the string began with d, indicating a directory; but the leading - indicates a data file rather than a directory. Option D's description would require rwx in the last three characters of the permission string; but the --- indicates no world access. Option E combines the directory error of option B with the world-access error of option D, and so is incorrect.
If a user is logged in when you change the user's UID number, problems can ensue because the login session will continue to use the old UID number. Thus, users should be logged out before you attempt to change their UID numbers. What option can you pass to groupadd to have it create a group with a GID number of 1027? - Answers - E You can use the --gid (or - g) option to groupadd to specify the GID number for a new group, so option E is correct. Options A, B, C, and D all present fictitious options to groupadd. You can type ______ to acquire root privileges that persist across multiple commands. - Answers - su You can type useradd ____ nemo as root to create the nemo account without creating a home directory for nemo. - Answers - Answer: - M 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. - Answers - Answer: - f or --force You can type _____ to learn your current username and nothing more? - Answers - Answer: whoami True or false: By default, useradd copies a set of user configuration files from /etc/skel when creating a new user account. - Answers - True Default user configuration files give users a head start on configuring their accounts and enable system administrators to set user default options. They're copied from /etc/skel unless you specify another location with the --skel (-k) option to useradd. True or false: The /etc/group file supports linking each user to a maximum of one group.
even on a multi-user system. Thus, option B is incorrect. Although root power is sometimes necessary for diagnostics, this isn't always the case, so option C is incorrect. Running untrusted programs is always risky, and running them as root is doubly risky, so option D is incorrect. You want to delete the oldproj group, so you type ______ oldproj. - Answers - Answer: groupdel True or false: GUI account management tools provide more options than their text- mode counterparts. - Answers - False Text-mode account management tools invariably provide as many or more options than do GUI account management tools. Which of the following pieces of information on user accounts is not normally stored in the /etc/passwd file on modern Linux distributions? - Answers - E Although /etc/passwd includes a field for the password, that field normally contains an x value, meaning that the encrypted password is stored in /etc/shadow. Thus, option E is correct. The accounts default shell, default GID number, UID number, and username all appear in /etc/passwd, so options A, B, C, and D are all incorrect. True or false: All user accounts are necessarily defined in /etc/passwd and /etc/shadow.
The >> operator appends standard output to a file, so option E is correct. The vertical bar (|) is the pipe character; it ties one program's standard output to another's standard input. The 2> operator redirects standard error, not standard output; and it overwrites the target file. The &> operator redirects both standard output and standard error, and it overwrites the target file. The > operator redirects standard output, but it overwrites the target file. True or false: You can delete any file on the computer by using rm as an ordinary user. - Answers - False Because of Linux's security features, you can only delete files in directories to which you have write access. As an ordinary user, you should not have write access to most of the system directories, so rm won't allow you to remove most system files. True or false: Linux lacks support for USB printers, so you must use a parallel or Ethernet printer with Linux. - Answers - False Linux supports a wide variety of USB printers (although you should check on support for specific models before buying). True or false: Linux supports two types of text-mode output to the screen, which you can send to separate files or display devices. - Answers - True The two types of output are standard output and standard error. True or false: The Secure Shell program is a command interpreter that keeps no history of its actions for others to discover, hence its name. - Answers - False The Secure Shell (SSH) is a remote-access protocol and associated client and server programs. It enables you to log into your computer remotely using encryption to enhance security compared to older unencrypted remote login tools. True or false: The /var/log/messages file always holds general-purpose log entries - Answers - False Although /var/log/messages is a common name for a general-purpose log file, not all distributions use this name; some use /var/log/syslog or some other file for this purpose. Which of the following commands provides a low-level way to install software on a Debian system? - Answers - E The dpkg program is the low-level interface to the Debian package system; you can use it to install, uninstall, and otherwise manage packages. Thus, option E is correct. Its equivalent on RPM-based systems is rpm, so option A is incorrect. Options B, C, and D are incorrect because they're all higher-level interfaces to RPM-based systems.
Which of the following programming languages is most often implemented as a compiled language? - Answers - D Of these languages, only C++ is commonly implemented as a compiled language, so option D is correct. The remaining options are all commonly implemented as interpreted languages. True or false: Both RPM and Debian packages can specify that they require other packages. The package system will then refuse to install the package unless these dependencies are met or you provide an override option. - Answers - True Dependency information is critical for package management, and it works as the question specifies. True or false: Typing ls . at a Bash prompt is guaranteed to show you all the files in the current directory. - Answers - False The specified command shows you all the files whose names include a dot (.), but there's no guarantee that all the files in the directory will include a dot in their names. True or false: You can modify graphics files from a text-mode login using Linux. - Answers - True The ImageMagick suite of graphics programs is text-based; you can use it to convert file formats, add frames to images, resize images, and so on, all from the command line. True or false: All Linux Web browsers are GUI programs. - Answers - False The Lynx Web browser is text-mode; you can run it in a terminal window or from a text- mode login. What symbol do you place after a command to run the program in the background? - Answers - A An ampersand (&), placed after a command typed in Bash, causes the command to run in the background, so option A is correct. The remaining options do not accomplish this task, although option C redirects standard output and option D creates a pipe to the following command on the same line. Option B is completely meaningless, as is option E in this context, although a hash mark (#) does serve as a comment character in Bash scripts. Which of the following is an inappropriate choice for a filesystem to hold the majority of a Linux installation? - Answers - D
Which regular expression string matches any sequence of characters of any length? - Answers - C The .* sequence matches any string of any length, so option C is correct. Option A matches a dot (.), which otherwise has a special meaning and so can't be used directly. Square brackets, as in option B, can surround a set of characters, any one of which will satisfy a match. A dot, as in option D, matches any single character. An asterisk (), as in option E, specifies an arbitrary number of repeats of the previous match. (Hence, . matches any number of characters, but neither character alone does the job.) True or false: Pressing the up arrow key in Bash reveals commands you've recently typed. - Answers - True The up arrow key enters previous commands from Bash's history in your command line, which can be helpful when typing a series of similar commands. Which of the following are risks you take when you browse the Web as an ordinary user on a properly-configured Linux system? (Select all that apply.) - Answers - a. Data transferred to or from a Web site can be intercepted, possibly exposing sensitive data to theft. b. A Web site with malicious dynamic content could steal your personal data files. A, B Most Web sites are unencrypted, so data transferred from the site and your computer, or vice-versa, can be intercepted, as option A suggests. (Most sites that transfer sensitive data employ encryption, but this isn't universally true.) Some Web sites deliver mini-programs that run on your computer, and if such a site delivers a malicious program, it could do just about anything, including steal your personal data files, as option B suggests. If you run the Web browser as an ordinary user, though, such a malicious program could not create a new account, so option C is incorrect. Likewise, your Linux login password is safe, so option D is incorrect. A Windows virus won't run on Linux at all, much less harm your hardware, so option E is incorrect. True or false: With most distributions, the contents of optical discs, USB flash drives, and other removable media appear in subdirectories of /media. - Answers - True Most distributions automatically mount removable media in their own subdirectories of /media. This practice is not universal, but it is very common, particularly when running desktop environments such as GNOME, KDE, or Xfce. Which of the following tools can you use to identify running processes? (Select all that apply.) - Answers - B, E
The ps and top programs are text-mode commands to identify running programs, so options B and E are both correct. The df program summarizes disk usage, bg shifts a suspended program into background execution, and mem summarizes memory use, so options A, C, and D are all incorrect. True or false: When operating on large files, the mv command works very quickly when the target directory is on the same low-level filesystem as the original file, but much more slowly when this isn't the case. - Answers - True The mv command moves or renames files, and it works by rewriting low-level filesystem data without touching the file's data when the target is on the same filesystem as the original. Thus, it can work quickly when this is the case. When moving a file across filesystems, though, mv must copy the data, which can take a while when the file is large. You type touch afile.txt in a directory that contains no files. What will be the effect? - Answers - D The touch command updates a file's time stamps or creates a new empty file if one doesn't already exist. Since the latter case is described by the question, a new file will be created, as described in option D. Since touch doesn't copy files, option A is incorrect. Option B would be correct if there were an explicit reference to your home directory in the file specification, but the command as stated works on a file in the current directory, so option B is incorrect. Because the command will create a new file, options C and E are both incorrect. True or false: A carat (^) represents the start of a line in regular expressions. - Answers
into DOS/Windows-style end-of-line characters, so option B is incorrect. The zip option causes - l option tells zip to include only the specified files, so option A is incorrect. The - i option does as the question specifies, so option E is correct. The --symlinksThe 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? - Answers - A The free command produces the information specified, so option A is correct. Options B, C, and D are all fictitious program names, at least on Linux. The Linux df command (option E) produces a summary of disk space available and used, not memory, so it's incorrect. True or false: KDE is built atop the Qt widget set. - Answers - True The K Desktop Environment (KDE) is built using the Qt GUI library (widget set), as the question specifies. Which of the following is the most common type of interface for internal hard disks on desktop computers today? - Answers - C SATA The Serial Advanced Technology Attachment (SATA) interface is the dominant type of internal hard disk interface today, so option C is correct. The older Parallel ATA (PATA) interface was once common, but has long been surpassed in popularity by SATA, so option A is incorrect. The Small Computer Systems Interface (SCSI) interface once dominated on high-end installations and is still in use, but is not popular on desktop systems, so option B is incorrect. Enhanced Integrated Device Electronics (EIDE) is another name for PATA, so option D is incorrect. The Universal Serial Bus (USB) is a common interface for external devices, including hard disks and many other devices, but the question specifies an internal interface, so option E is incorrect. True or false: Partitioning a disk can enable you to install multiple OSes on one computer - Answers - True You can assign one OS to reside on one partition (or set of partitions) and another OS to reside on another. This is one of several purposes for disk partitions True or false: The gzip program generally produces more compact compressed files than does the bzip2 program. - Answers - False The bzip2 program usually produces compression that's superior to gzip's. Both programs are surpassed by xz. The first process to be run by the Linux kernel is normally called _______ - Answers - Answer: init
True or false: The /var/log/messages file always holds general-purpose log entries. - Answers - False Although /var/log/messages is a common name for a general-purpose log file, not all distributions use this name; some use /var/log/syslog or some other file for this purpose. The process that launched a given process is known as the ________ process - Answers - Answer: parent A condition in which a program allocates more and more memory but doesn't use the memory it allocates is called a ______ ______ (two words). - Answers - Answer: memory leak An Internet site that hosts software that you can install with yum, APT, or a similar tool is known as a __________. - Answers - Answer: repository True or false: The ps program enables you to view the process table. - Answers - True The ps program is one of the primary means of viewing the process table, which holds information on running processes. True or false: Pressing the M key in top causes the display to change to sort processes by memory use. - Answers - True The M key in top works as specified. True or false: You can use grep to search for strings in binary files. - Answers - True Although grep is more commonly employed to search text files, it can search for strings in binary files. The _________ option to tar causes it to back up only the specified low-level filesystem; if another filesystem is mounted within the directory you say to back up, those files will be ignored. - Answers - Answer: --one-file-system True or false: A carat (^) represents the start of a line in regular expressions. - Answers
You want to copy the contents of the ~/important directory, including all its subdirectories, to /media/usb. What command can you type to accomplish this goal? - Answers - B To copy an entire directory tree, you must use a recursive copy parameter, such as -- recursive, - R, or - r. (An archive copy, as in --archive or - a, will also work.) Of the options shown here, only B includes one of these parameters, so it is correct. Option A lacks any parameters to cp, so it won't work. Option C's - u option performs an update copy—it copies files only if the original file is newer than any file of the same name at the target location. Option D's - i performs an interactive copy, querying the user before overwriting existing files. Option E's - f option forces cp to overwrite existing files without prompting. True or false: You can delete any file on the computer by using rm as an ordinary user. - Answers - False Because of Linux's security features, you can only delete files in directories to which you have write access. As an ordinary user, you should not have write access to most of the system directories, so rm won't allow you to remove most system files. True or false: If you want to create a link to a directory, you must use a hard link. - Answers - False Most filesystems disallow hard links to directories, and mv won't let ordinary users create one even if the filesystem supports this feature. Soft (also known as symbolic) links, on the other hand, can point to directories, and ordinary users can create such links. Thus, the statement in the question is false; you must use a soft link, not a hard link, when linking to a directory. True or false: The Secure Shell program is a command interpreter that keeps no history of its actions for others to discover, hence its name. - Answers - False The Secure Shell (SSH) is a remote-access protocol and associated client and server programs. It enables you to log into your computer remotely using encryption to enhance security compared to older unencrypted remote login tools. To refer to the file afile.txt in the directory one level above the current one, you would type ___afile.txt. - Answers - Answer: ../ A symbol found in the root shell prompt by default is __. - Answers - Answer: # What symbol do you place after a command to run the program in the background? - Answers - A An ampersand (&), placed after a command typed in Bash, causes the command to run in the background, so option A is correct. The remaining options do not accomplish this task, although option C redirects standard output and option D creates a pipe to the
following command on the same line. Option B is completely meaningless, as is option E in this context, although a hash mark (#) does serve as a comment character in Bash scripts. To obtain a color-coded file listing, if your distribution doesn't produce one by default, you would type ls _____. - Answers - Answer: --color To display the last few lines of a text file, you would type _____ afile.txt. - Answers - tail Which of the following is not a Linux command shell program? - Answers - D The login program handles text-mode logins, but it isn't a shell program, so option D is correct. The remaining options are all Linux shell programs, so options A, B, C, and E are all incorrect. (Option E, bash, is the default shell for most distributions.) True or false: You can use a recordable optical disc to transfer data from a Linux computer to a Windows computer. - Answers - True The most common optical disc formats (CD, DVD, and Blu-Ray) and filesystems (ISO- 9660 and UDF) work equally well on both Linux and Windows. Thus, you can use an optical disc to transfer data from Linux to Windows, or vice-versa. True or false: Partitioning a disk can enable you to install multiple OSes on one computer. - Answers - True You can assign one OS to reside on one partition (or set of partitions) and another OS to reside on another. This is one of several purposes for disk partitions. The /proc/______ pseudo-file holds data on your CPU, such as its model name and clock speed. - Answers - Answer: cpuinfo The _____ library provides drivers to control scanners. (Provide the acronym for the library's name.) - Answers - Answer: SANE You can type Xorg ________, as root, to have X create a default configuration file that you can then modify. - Answers - Answer: - configure Where do most drivers exist on a Linux system? - Answers - C Drivers manage hardware, and as such, they're most commonly part of the Linux kernel, so option C is correct. Some drivers reside in libraries (option A) or in application programs (option D), but these locations are less common than the kernel, so options A and D are both incorrect. Firmware is software that's part of the hardware, and although firmware is important, it's distinct from drivers, so option B is incorrect. Configuration files can sometimes affect how drivers work, but they are not themselves drivers nor do they contain drivers, so option E is incorrect.