WGU Operating Systems 1 POST Assessment

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

True There are 10 characters in the Linux file directory listing in which the first character shows the file type and the next 9 characters are permissions, consisting of three groups: owner, group, and other users. FOR EXAMPLE: Permission: -rwxrw-r-- Position number: 0123456789 The textual representation of 741 will be -rwx-rw---x. Each group consists of three symbols rwx (in this order). If some permission is denied, they are replaced with a dash "-". The final letter is most commonly a lowercase x or a hyphen, although other letters can be possible. If another letter is shown, that indicates the usage of a less common permission bit. If a lowercase letter is shown, that means the execute bit is set. According to the scenario, chmod 741 secure will give all access permissions to the owner, only read access permission to the group members, and only execute access permission to other users. The Octal format is the numeric representation of access rights in which every octal digit combines read, write, and execute permissions. For example, in 0764, the numeral "0" is the representation of the octal format and is optional. The last three digits are permissions for the owner, group, and other users respectively.

(T or F) John works as a professional Ethical Hacker for uCertify Inc. He has been assigned a project to test the security of www.we-are-secure.com. He enters the following command on the Linux terminal: chmod 741 secure.c By doing this, John is providing all rights to the owner of the file. Also, by the octal representation of the file access permission, John is restricting the group members to only read the file named "secure".

True

(T or F) By creating symbolic links from the previous to the new path and by mounting the new filesystem on the previous path can aid in avoid having to reconfigur applications for a new path, after moving data to a new filesystem?

True Missing libraries, duplicate files, and incompatible support programs are most likely to cause package dependency conflicts. Libraries are support code used by different programs. Conflicts can occur when a package tries to install a file already installed on the system. Wrong versions of support programs can cause conflicts and compatibility issues too.

(T or F) Missing libraries, duplicate files, and incompatible support programs are most likely to cause package dependency conflicts.

True

(T or F) Swap space depends on amount of RAM as well as space on a hard disk and should be two to three times the amount of RAM.

testprog 2>> errors_til_now.txt The administrator should use the testprog 2>> errors_til_now.txt command. This command will save all the error messages encountered when running testprog in the file errors_til_now.txt. The 2 parameter is the file descriptor and points to standard error output. This means that only the error output will be placed in the file, and all other output will be displayed on the terminal screen. Using the >> operator, the administrator can append the error messages in the same file. The operator will neither overwrite the message nor create a new one.

A Linux administrator wants to store all the error messages that are encountered when running the testprog program in an existing file named errors_til_now.txt. You want to error messages to be added to the current contents of the file. Which command should the administrator use to accomplish this?

:r !date The :r !date command will insert the current system date into a separate line below the present cursor position in the file.

A user is editing a file named mydoc and needs to enter the current system date in the file. Which command will insert the system date in the file without exiting the vi editor?

The /samplefiles/personaldata directories will be added to the /home/user/homedirectory directory without prompting the user. The mkdir command is used to create directories in a Linux file system. The -p parameter creates the parent directories specified

A user issues the mkdir -p /home/user/homedirectory/samplefiles/personaldata command. Only the /home/user/homedirectory directory path currently exists and contains user data. What will be the result of issuing the above command?

The BIOS boot order is incorrect. The BIOS boot order is incorrect. Whenever a system boots, the system checks the boot order specified in the BIOS. There are many ways to boot a system. For example, you can boot the system using a bootable CD, a floppy disk, the network, or the hard disk. In this scenario, the hard disk precedes the CD-ROM in the boot order configured in BIOS. Therefore, the search for the boot media stops when the computer is able to boot from one of the boot media specified in the BIOS list. Each subsequent device is tried until a boot is achieved. The search is not conducted on any devices encountered after the first successful device that boots. To boot the system from the CD-ROM, you should reconfigure the BIOS so that the CD-ROM drive precedes the hard drive. The user is not required to install the Linux driver because there is no driver for a Linux installation. There are drivers only for devices installed on the Linux system. It is not likely that the surface of the bootable CD-ROM contains scratches. Even if the CD-ROM is scratched, the system will try to boot from it if the BIOS boot order includes the CD-ROM as the boot media. If the hard disk did not support Linux, the system would have booted from the CD-ROM but produced an error. Another BIOS issue that you need to know how to resolve is if your BIOS does not detect the full size of a newly installed hard drive. Some older BIOS versions are only capable of detecting a hard drive up to a certain size. If your BIOS does not detect the full size of the hard drive, you need to upgrade the BIOS to a new version.

Emily wants to configure a dual bootable system on a machine previously installed with Windows 8. Emily inserts the Linux bootable CD-ROM to install Linux, but the system boots to Windows 8. What is the possible cause of this error?

i (insert): inserts texts before the cursor a (append): inserts text after cursor by advancing one space The i and a commands both enter the insert mode. The i command allows user to insert text before the current cursor position, whereas the a command appends text after the current cursor position.

How do the i and a commands of the vi editor differ?

chgrp bar foo According to the scenario, John will use the "chgrp bar foo" command to accomplish the task. The chgrp (change group) command is used by unprivileged users to change the group associated with a file. Unlike the chown command, chgrp allows regular users to change groups, but only to one of which they are a member. The general syntax of the chgrp command is as follows: chgrp group target1 [target2 ..] The parameters used in the command are explained below: --The group parameter indicates the new group with which the targets should be associated. --The target1 parameter indicates the files or directories for which the change should be made. --The optional additional targets indicate additional files or directories for which the change should be made.

John works as a network administrator for Perfect Solutions Inc. The company has a Linux-based network. John is working as a root user on the Linux operating system. He wants to change the group membership of the file named "foo" to use the group ID for the group named "bar". Which command will he use to accomplish the task?

alien -i packagename According to the given scenario, Mark will use the alien -i packagename command because this command automatically converts a non-Debian package into a Debian format. The alien -r packagename command is used to convert an rpm file into a Debian format.

Mark works as a network administrator for Perfect Solutions Inc. He wants to install a non-Debian package on the Debian system. Therefore, he has to run a command to convert a non-Debian package into a Debian format. Which command should Mark use to accomplish the task?

killall -i vi You should run the killall -i vi command to confirm each vi process before terminating. The -i parameter will prompt you to confirm each process termination.

Users are complaining that a Linux server is responding very slowly today. You discover that there are several vi processes running on the server. You need to terminate all of these processes. However, you want to confirm each process before terminating, just to check which processes are terminating. Which command should you run?

The gzip command is used to reduce the size of the named files using Lempel-Ziv coding (LZ77) algorithm. It replaces each file with the extension .gz, while keeping the same ownership modes, access and modification times.

What is gzip?

1 The init process is assigned process ID (PID) 1. The init process is the first process to be started by the kernel. The init process reads the /etc/inittab file and creates system processes based on the contents of that file. The init process can be used to change the runlevel of the Linux computer. The two main utilities for viewing processes are the ps and top commands.

What is the PID of the init process?

runlevel A runlevel is a state, or mode, of the Linux operating system on which it is running. When a computer running Linux is booted, it boots at a default runlevel. The default runlevel depends on which operating system is being used. A runlevel of 3 or 5 is a common default.

What is the command for checking the Linux system run level?

The top command is used to monitor processes. This command shows system summary information and information about most CPU-intensive processes on a computer. Execute the "top -p 2396" command to monitor a process whose process id is 2396 where, the -p option is used to monitor a specific process

What is the command to monitor the status of a process whose process id is 2396

10

What is the default priority assigned when using the nice command without specifying the priority?

A disk using an MBR can have a limited number of primary partitions, plus an extended partition containing a potentially large number of logical partitions. The original MBR partition scheme permitted only a small number of partitions. To extend this scheme, a larger number of "logical drives" could be stored in an "extended partition".

What is the relationship between primary partitions, extended partitions, and logical drives?

the tee command You should use the tee command if you want to redirect the output from a command to both standard output and a file. The tee command allows you to keep a copy of an output while viewing it on screen. The following command saves the output of the ls command in the file1 and file2 files and displays the results of the ls command on the monitor: $ ls MainFIle[1-3]|tee file1 file2

What should you use if you want to redirect the output from a command to both standard output and a file?

Hy hr The tr command takes the output of echo "Hey there" as the standard input and the -d option removes the characters "e" and "t" from the input set. Hence the output will be Hy hr.

What will be the output when the following command is executed on a Linux terminal? echo "Hey there" | tr -d et

A SCSI ID of 7 should be avoided while assigning IDs to SCSI peripherals because this SCSI ID number is used by the SCSI controller. It is used to uniquely identify and prioritize devices attached to the SCSI controller. All of the other options are valid SCSI IDs and should not be avoided. Each SCSI device must have a unique SCSI ID because SCSI devices must be uniquely identified. Depending on the controller used, the SCSI IDs are categorized as 0 - 7 or 0 - 15. If fifteen IDs are used, the first eight IDS (0 - 7) are given the highest priorities starting with 7 and descending, and the second eight IDs (8 - 15) are given priority after the first eight, starting with 15 and descending. If you attempt to install more devices than the SCSI standard supports, the device will not function. The number of devices that each SCSI specification supports are as follows: --SCSI-1: supports up to 8 devices --Fast SCSI: supports up to 8 devices --Fast-Wide SCSI: supports up to 16 devices --Ultra SCSI: supports up to 8 devices --Ultra-Wide SCSI: supports up to 16 devices --Ultra 2 SCSI: supports up to 8 devices --Ultra 2 Wide SCSI: supports up to 16 devices --Ultra 3 SCSI: supports up to 16 devices --Ultra 320 SCSI: supports up to 16 devices --Ultra 640 SCSI: supports up to 16 devices

Which ID should NOT be used while assigning IDs to SCSI peripherals?

cat testfile, cat < testfile The commands cat testfile and cat < testfile are same and perform identically.

Which are two commands can be used to view the contents of a file?

dd if=/dev/sda1 of=/dev/dvd The dd if=/dev/sda1 of=/dev/dvd command backs up the contents of the /sda1 partition (first partition in the first drive) to a DVD drive. if specifies the input file and of specifies the output file.

Which command backs up the contents of the /sda1 partition to a DVD drive?

quotacheck The quotacheck command builds and initializes files needed to enable quotas on a filesystem with the -cug options. These files are aquota.user and aquota.group.

Which command builds and initializes files needed to enable quotas on a filesystem?

find -perm -0600 The find -perm -0600 command lists the files in the current directory for which the file owners have read and write permissions. The minus sign (-) before the octal permission 0600 specifies that the find command should locate files in which all of the specified permission bits are set. If a plus sign (+) were used before the permission, then find would locate files in which any of the specified permission bits are set. If neither a plus sign nor a minus sign are specified, then the specified permission bits must match exactly.

Which command can be executed to find all the files in the current directory for which the file owners have read and write permissions?

set The set command can be used to modify options and parameters for a running bash shell. It is a built-in function.

Which command can be used to modify options and parameters for a running bash?

uniq The uniq command can be used to remove all duplicate lines from a sorted file. uniq is a command that prints the unique lines by removing the duplicate lines from a sorted file. To run the uniq command, it is necessary for the files to be sorted. The uniq command requires sorted files because it compares only consecutive lines. It's because of this reason that it is usually used in conjunction with the sort command. Syntax: uniq [OPTION] filename The options are listed below: -d: Prints only repeating lines -u: Prints only non-repeating lines For example: uniq -u file1 This command displays only non-repeating lines in the file named file1.

Which command can be used to remove all the duplicate lines from a sorted file?

dpkg-reconfigure The dpkg-reconfigure command is used to revert a package to its standard configuration. It runs the initial configuration script for the specified program.

Which command can be used to revert a package to its standard configuration?

find The find command can be used to search for a file of a specific size. This command searches files in a specified directory tree.

Which command can be used to search for a file of a specific size?

rpm2cpio pkg-ver.src.rpm > pkg-ver.src.cpio The rpm2cpio pkg-ver.src.rpm > pkg-ver.src.cpio command creates a cpio archive file. The rpm2cpio command outputs the archive on the standard output, hence the output is redirected to create an archive file.

Which command creates a cpio archive file?

dmesg The dmesg command can be used to display messages that were generated during the normal boot sequence. This command displays the information stored in the kernel ring buffer.

Which command is used to display messages that were generated during the normal boot sequence?

mkswap The syntax of the command is: mkswap [options] device [size] where, the device argument will be a disk partition or a large file that has been created for swap space.

Which command is used to set up a Linux swap area on a device or in a file.

systemctl The systemctl command lists the systemd units currently loaded on the system. This command is used to control services and targets.

Which command lists the systemd units currently loaded on the system?

rpmbuild --rebuild pkg-ver.src.rpm The rpmbuild --rebuild pkg-ver.src.rpm command rebuilds the package. The rpmbuild --rebuild command rebuilds the specified binary package.

Which command rebuilds an rpm package named pkg-ver.src.rpm?

tune2fs The tune2fs command adds a journal to an existing ext2 filesystem without altering the data present on the partition. The tune2fs -j command is used to convert a Linux second extended (ext2) filesystem into a third extended (ext3) filesystem using the default journal parameters. As the system reads the /etc/fstab file on bootup, the /etc/fstab file should be modified to specify the filesystem name as ext3 for the system to recognize the filesystem on next boot up. If the /etc/fstab file is not updated, the system will boot as normal with the journaling feature disabled.

Which command will add the journaling support to an existing Linux second extended (ext2) filesystem?

/proc The /proc filesystem contains a USB filesystem provided by Linux to access files that controls the USB devices. This information is accessible from /proc/bus/usb.

Which directory contains a USB filesystem provided by Linux to access files that controls the USB devices?

/etc/yum.conf The /etc/yum.conf file is the default Yum configuration file. This file stores information such as directory in which Yum downloads packages and where Yum creates a log of its activities.

Which file is the default Yum configuration file?

grub.cfg

Which file stores GRUB configuration details?

ext3, reiserFS, and vxfs The third extended (ext3) filesystem, Reiser filesystem (reiserfs), and Veritas filesystem (vxfs) all support journaling. The ext3 filesystem is a variation of ext2 that allows journaling and has a faster startup and recovery time. The reiserfs filesystem, a journaling filesystem similar to the ext3 filesystem, is more suitable for use with databases. Reiserfs is no longer in use and has been superseded by Reiser4. Raiser4 provides more efficient journaling, transparent compression, and data checksums needed by the cryptcompress plugin. The reiserFS is a filesystem based off b-trees. The B-tree filesystem (Btrfs) is a GPL-licensed copy-on-write Linux filesystem. The Btrfs filesystem addresses the lack of pooling, snapshots, checksums, and integral multi-device spanning in Linux filesystems. The vxfs filesystem supports large files and access control lists. The second extended (ext2) filesystem does not support journaling. It is the traditional filesystem used in Linux, and supports access control lists. The DOS FAT (vfat) filesystem does not support journaling. It does support long filenames. The hierarchical filesystem (hfs) does not support journaling. The hfs filesystem is native to Apple Macintosh computers. Linux supports several filesystem types, including ext2, ext3, ext4, reiserFS, xfs, and vxfs. Journaling is an attribute of a filesystem that allows system recovery after a crash. The ext3 filesystem provides journaling, and the ext4 expands the size limits of the ext3 filesystem (up to 1 exabyte with files as large as 16 terabytes). The Extensible Filesystem (XFS) is a filesystem with journaling and is very scalable. It caches in-transit data and needs the support of an uninterrupted power supply. The vfat filesystem is also known as FAT32 and is a common filesystem on Windows systems. It is not journaled and lacks features to be used fully on a Linux system. To know which filesystems are already supported on your Linux system, use the following command: $ ls /sbin/mk* The valid commands that can be used to create filesystems in Linux are as follows: mkfs: creates most filesystems mkfs.msdos, mkdosfs, or mkfs.vfat: creates a DOS FAT filesystem mkfs.ext2 or mke2fs: creates an ext2 filesystem mkfs.ext3 or mke2fs -j: creates an ext3 filesystem mkisofs: creates a CD-ROM filesystem mkfs.reiserfs or mkreiserfs: creates a ReiserFS filesystem

Which journaling filesystems are available in Linux?

join The join command is used to combine two files by matching the fields within them. By default, this command matches the files based on the content in their first fields.

Which of the following commands can be used to combine two files by matching the fields within them?

chmod +t /ucertify The chmod +t /ucertify command sets the sticky bit for the /ucertify directory. The +t option is used to set the sticky bit.

Which of the following commands can be used to set the sticky bit for the /ucertify directory?

cat The cat command is used to join files end to end. This command concatenates the files and sends the result to a specified file or the standard output. The join command is used to combine files, field by field and has to join a sorted file.

Which of the following commands is used to join files end to end?

dpkg -P prog The -P option used with dpkg is used to remove the installed package along with its configuration files.

Which of the following commands will you use to remove a prog package along with its configuration files?

D-Bus The D-Bus utility enables communication between processes for hotplug devices. It runs as a daemon and abstracts hardware information access.

Which of the following utilities enables communication between processes for hotplug devices?

timeout The timeout option defines the wait duration for GRUB. This option is used to specify the time duration, in seconds, GRUB has to wait before booting the default OS.

Which option defines the wait duration for GRUB before loading the default operating system?

ext2 ext2 (second extended filesystem) is the default filesystem type created when no option is specified with the mkfs command. The -t option is used to specify the filesystem to be created.

Which the default filesystem type created when no option is specified with mkfs?

mkfs.vfat, mkfs -t vfat, mkfs.msdos The mkfs.vfat, mkfs -t vfat, and mkfs.msdos commands can be used to create a vfat filesystem. The vfat filesystem is also known as Windows FAT (file allocation table) filesystem.

Which three commands can be used to create a vfat filesystem?

tail, tail -10 The tail or tail -10 command can be used to see only the last ten lines of a file. By default, the tail command shows the last 10 lines of a file.

Which two commands can you use to see only the last ten lines of a file?

APT, YUM The Advanced Package Tools (APT) utility was developed by Debian as a high-end, text-based package-management tool. YUM, which is used by Red Hat, Fedora, and some other RPM-based distributions, serves a similar function.

Which two tools are designed to help keep a Linux system's software packages up to date?

yy To copy several consecutive lines from a file, you should navigate to the first line to be copied and use the yy command to copy the lines into the buffer. For example, if you wanted to copy four lines, the command would be 4yy. The Y command is equivalent to the yy command. The l command is used to navigate right one character. The y command is used to copy a single line into the buffer. The yl command is used to copy a certain number of characters into the buffer. For example, 4yl would copy the first four characters after the cursor.

While using the vi editor, you need to copy several consecutive lines from a file. You navigate to the first line that you need to copy. Which command should you use?

:q! The :q! command is used to forcefully quit a file. It is mostly used to quit the read-only file.

You are working on your Linux system. Accidently, you made changes in one of the read-only file and you are unable to quit editing the file with the "q" command. Which of the following commands will you run to quit from the file without saving changes?

4 You are limited to four primary partitions on each hard disk. To have more partitions, substitute an extended partition for one primary partition. You can then configure the local partitions that you need within the extended partition.

You have to create a primary partition on one of your hard disk in a Linux system. How many primary partitions can you create?

-a You should use the -a parameter of the repquota command to report quota usage for all filesystems in the /etc/mtab file. This command reports disk quota usage details.

You need to run the repquota command to determine quota usage on your Linux server. The output must report quota usage for all filesystems in the /etc/mtab file. Which parameter should you use?

wc -c file1.txt 2>error.txt According to the scenario, you will use the wc -c file1.txt 2>error.txt command to accomplish the task. The 2> redirection operator is an error redirector, which, while running a command, redirects the error (if it exists) on the specified file.

You run the wc -c file1.txt command. If this command displays any error message, you want to store the error message in the error.txt file. Which commands will you use to accomplish the task?

Reconfigure the BIOS To successfully boot your system without a keyboard, you need to ensure that the corresponding BIOS setting is made for it. The BIOS is firmware that resides on a chip on the computer's motherboard. Its job is to initiate the boot process. Many computers are meant to be used as servers. Often, they do not need keyboards connected to them. Removing keyboards from computers intended to be used as servers helps reduce clutter and accidental key pressing that may cause the system to halt. To enable booting without a keyboard, you need to first disable the BIOS option called "Halt On," or a similarly worded option if the BIOS system has slightly varying terms. This option stops the boot on a specified action. By disabling it, the system will boot even without the keyboard.

You try to boot your Linux computer, and no keyboard is attached. The system will not boot and reports a keyboard error. What can you do to start the system without the keyboard?

repquota -a The repquota -a command can be used to get a summary of all user and group quotas and the disk usage for filesystems with quotas enabled. Only the root user can view all user and group quotas.

You want to retrieve the summary of all user and group quotas and the disk usage for filesystems with quotas enabled. Which command will you use to accomplish the task?

Track the amount of free space on the hard disk. If there is no free space on the hard disk drive, users will not be able to write on it. To prevent this issue from happening again, you should track the amount of free space on the hard disk. By doing so, you can take necessary actions before the actual problem arises.

You work as a network administrator for Net World International. You have installed a Linux server on the company's network. Users report that they are unable to write on a filesystem. You verify that there is no free space available on the hard disk drive. You mount another hard disk drive to resolve the issue. How will you prevent the issue from happening again?

Kill the process and rerun it by using the nice command with the -n 19 switch. The nice command is used to run a process with the desired priority level. The priority level varies from -20 to 19. Level -20 is for the highest priority and level 19 is for the lowest. By default, every process runs with the priority level 0.

You work as a network administrator for Rick International. The company has a Linux-based network. A process is running on a server. It is using a lot of processing power. You want the process to use fewer resources. Which action will you perform to accomplish the task?

ps The ps command reports the status of processes that are currently running on a Linux computer.

You work as a network administrator for Tech Perfect Inc. The company has a Linux-based network. You want to kill a process running on a Linux server. Which command will you use to determine the process identification number (PID) of the process?

wc The wc (word count) utility displays the number of lines, the number of words, and the number of characters in a text file

You've been asked to write a 1,000-word report, formatted as a plain ASCII text file. What utility can you use to count the words in your file to verify that it's the correct length?


Set pelajaran terkait

Chapter 15/19 Study Guide- APES, GVHS

View Set

Ch.4 Managing your cash and savings

View Set

Sound Byte: Network Topology and Navigation Devices

View Set

chapter 17 questions Uterus and Vagina

View Set

F. Scott Fitzgerald AP Lit. Sources

View Set

Chapter 2- Global Economic Environment

View Set