Linux Commands Multiple Choice 2

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Mariiikar
M
Mariiikar
Community Contributor
Quizzes Created: 2 | Total Attempts: 7,124
Questions: 69 | Attempts: 480

SettingsSettingsSettings
Linux Commands Multiple Choice 2 - Quiz

This is part two of Linux commands multiple choice questions. These quizes should get you up to scratch for any Linux certificate, college module, etc. Just repeat the quiz over and over until you get 90% + and you will surely be ahead of the rest at exam time.


Questions and Answers
  • 1. 

    What two commands display the status of processes on a Linux system?

    • A.

      Ls and df

    • B.

      Ps and top

    • C.

      Ps and df

    • D.

      Df and top

    • E.

      Du and df

    Correct Answer
    B. Ps and top
    Explanation
    b. Both ps and top yield process status. None of the other listed commands are related to processes.

    Rate this question:

  • 2. 

    What does the device file /dev/hdb6 represent?

    • A.

      An extended partition on a SCSI disk drive

    • B.

      A logical partition on a SCSI disk drive

    • C.

      An extended partition on an IDE disk drive

    • D.

      A primary partition on an IDE disk drive

    • E.

      A logical partition on an IDE disk drive

    Correct Answer
    E. A logical partition on an IDE disk drive
    Explanation
    e. IDE disk drives are referred to as /dev/hdx, where x is a, b, c, or d. Partitions are numbered from 1 through 4 for primary and extended partitions and 5 through 16 for logical partitions.

    Rate this question:

  • 3. 

    Which command will display the last lines of the text file file1?

    • A.

      Head -b file1

    • B.

      Head --bottom file1

    • C.

      Head -v file1

    • D.

      Tail file1

    • E.

      Tail -n 1 file1

    Correct Answer
    D. Tail file1
    Explanation
    d. The tail command is used for checking the last lines of a text file. By default, it displays 10 lines.

    Rate this question:

  • 4. 

    In the Bash shell, entering !! has the same effect as which one of the following?

    • A.

      Ctrl-P and Enter

    • B.

      Ctrl-N and Enter

    • C.

      Ctrl-U and Enter

    • D.

      !-2

    • E.

      !2

    Correct Answer
    A. Ctrl-P and Enter
    Explanation
    a. The !! command history expansion executes the previous command. Entering the Ctrl-P keystroke uses the Emacs key-binding bash to move up one line in the history; pressing Enter executes that command.

    Rate this question:

  • 5. 

    Which of the following commands can be used to check an ext2 filesystem? Select three that apply.

    • A.

      Fsck -ext2 /dev/hda5

    • B.

      Fsck /dev/hda5

    • C.

      E2fsck /dev/hda5

    • D.

      Fsck.ext2 /dev/hda5

    • E.

      Fsck.linux /dev/hda5

    Correct Answer(s)
    B. Fsck /dev/hda5
    C. E2fsck /dev/hda5
    D. Fsck.ext2 /dev/hda5
    Explanation
    b, c, and d. fsck is a frontend for the programs that actually do the checking. e2fsck and fsck.ext2 are links to the program that checks native Linux ext2 filesystems.

    Rate this question:

  • 6. 

    In response to the df command, the system reports a Use% of 98% for the filesystem mounted on /home. Which one of the following best describes the significance of this information?

    • A.

      Files on /home are consuming 98% of the physical disk.

    • B.

      File read/write activity on /home is consuming 98% of system I/O capacity.

    • C.

      Files on /home are consuming 98% of the /home filesystem.

    • D.

      Inodes on /home are nearly exhausted.

    • E.

      Inodes on /home are 98% free.

    Correct Answer
    C. Files on /home are consuming 98% of the /home filesystem.
    Explanation
    c. df reports disk information, including a percentage of the filesystems used. Answer a is incorrect because /home may not be the only partition on the physical disk.

    Rate this question:

  • 7. 

    Of the following directories, which one is the most important to back up on a routine basis?

    • A.

      /var

    • B.

      /tmp

    • C.

      /usr

    • D.

      /root

    • E.

      /etc

    Correct Answer
    E. /etc
    Explanation
    e. /var and /tmp are mainly transient, /usr is typically static (and should be easy to reinstall from the original OS media), /root is simply a home directory for root, but /etc contains system configuration information that frequently changes.

    Rate this question:

  • 8. 

    Carolyn has a text file named guest_list containing 12 lines. She executes the following command. What is the result?# split -4 guest_list gl

    • A.

      The first four columns in the text are written to new files glaa, glab, glac, and glad.

    • B.

      The first four columns in the text are written to new files aagl, abgl, acgl, and adgl.

    • C.

      The lines of guest_list are evenly divided among new files glaa, glab, glac, and glad.

    • D.

      The lines of guest_list are evenly divided among new files glaa, glab, and glac.

    • E.

      The lines of guest_list are evenly divided among new files aagl, abgl, and acgl.

    Correct Answer
    D. The lines of guest_list are evenly divided among new files glaa, glab, and glac.
    Explanation
    d. split -n outfile separates a file into multiple output files, each with n lines, and names them outfileaa, outfileab, and so on. Since the original file had 12 lines and Carolyn split it into sets of 4 lines, the result is three files named glaa, glab, and glac, each containing 4 lines.

    Rate this question:

  • 9. 

    Which one of the following commands would be best suited to mount a CD-ROM containing a Linux distribution, without depending on any configuration files?

    • A.

      Mount /dev/cdrom /dev/hdc

    • B.

      Mount -f linux /dev/hdc /mnt/cdrom

    • C.

      Mount -t iso9660 /dev/cdrom /mnt/cdrom

    • D.

      Mount -t linux /dev/cdrom /mnt/cdrom

    • E.

      Mount -t iso9660 /mnt/cdrom /dev/cdrom

    Correct Answer
    C. Mount -t iso9660 /dev/cdrom /mnt/cdrom
    Explanation
    c. CD-ROMs use the iso9660 filesystem, which is the default for mount, but also indicated using -t. Without the assistance of an entry in /etc/fstab, both the mount device (/dev/cdrom) and the mount point (/mnt/cdrom) must be provided.

    Rate this question:

  • 10. 

    An ext2 filesystem is configured with user quotas enabled. The soft limit is set at 100 MB per user, the hard limit is set at 110 MB per user, and the grace period is seven days. User bsmith already owns 90 MB of the data stored on the filesystem. What happens when bsmith writes a new file of size 30 MB? Select one.

    • A.

      The write will fail, but the superuser can recover the entire file within seven days.

    • B.

      The write will fail, and the file will be truncated permanently.

    • C.

      The write will succeed, but the file will be truncated permanently.

    • D.

      The write will succeed, but the file will be available for only seven days.

    • E.

      The write will succeed, but the file will be truncated in seven days.

    Correct Answer
    B. The write will fail, and the file will be truncated permanently.
    Explanation
    b. The write will continue until the hard limit of 110 MB is reached, after which the write fails and data is lost.

    Rate this question:

  • 11. 

    Which of the following commands displays the comments from a bash script? Select all that apply.

    • A.

      Find "^#" /etc/rc.d/rc.local

    • B.

      Sed '/^#/ !d' /etc/rc.d/init.d/httpd

    • C.

      Grep ^# /etc/rc.d/init.d/httpd

    • D.

      Grep ^# /etc/passwd

    • E.

      Locate "^#" /etc/skel/.bashrc

    Correct Answer(s)
    B. Sed '/^#/ !d' /etc/rc.d/init.d/httpd
    C. Grep ^# /etc/rc.d/init.d/httpd
    Explanation
    b and c. find and locate do not search the contents of files. /etc/passwd is not a script.

    Rate this question:

  • 12. 

    .Which one of the following answers creates an environment variable VAR1, present in the environment of a bash child process?

    • A.

      VAR1="fail" ; export VAR1

    • B.

      VAR1="fail" \ export VAR1

    • C.

      VAR1="fail"

    • D.

      Set VAR1="fail" ; enable VAR1

    • E.

      Export VAR1 \ VAR1="fail"

    Correct Answer
    A. VAR1="fail" ; export VAR1
    Explanation
    a. The variable must be set and exported. The semicolon separates the two commands.

    Rate this question:

  • 13. 

    State the syntax to direct the standard output of cmd1 directly into the standard input of cmd2.

    • A.

      Cmd1 | cmd2

    • B.

      ...

    Correct Answer
    A. Cmd1 | cmd2
    Explanation
    The correct answer is "cmd1 | cmd2" because the pipe symbol "|" is used to redirect the standard output of cmd1 to the standard input of cmd2. This allows the output of cmd1 to be used as the input for cmd2, enabling the two commands to be connected in a pipeline.

    Rate this question:

  • 14. 

    Which of the following directories must be part of the root filesystem? Select two of the following that apply.

    • A.

      /etc

    • B.

      /home

    • C.

      /lib

    • D.

      /usr

    • E.

      /root

    Correct Answer(s)
    A. /etc
    C. /lib
    Explanation
    a and c. /etc, /lib, /bin, /sbin, and /dev must be in the / filesystem.

    Rate this question:

  • 15. 

    Alex is currently working in a directory containing only one file, Afile1. What is displayed after the following commands are entered in bash?# MYVAR=ls # echo $MYVAR "$MYVAR" '$MYVAR' '$MYVAR'

    • A.

      Afile1 Afile1 Afile1 Afile1

    • B.

      Ls Afile1 Afile1 Afile1

    • C.

      Ls ls Afile1 Afile1

    • D.

      Ls ls $MYVAR Afile1

    • E.

      Ls ls ls $MYVAR

    Correct Answer
    D. Ls ls $MYVAR Afile1
    Explanation
    d. The first echo argument is unquoted and thus returns its contents, ls. The second is quoted with double quotes, which do not preserve the $, so it too returns ls. The third is quoted with single quotes, which do preserve the $, so it returns the string $MYVAR. The last argument is backquoted, which means that it returns the result of the command stored in $MYVAR. The command is ls, which displays the only file in the directory, Afile1.

    Rate this question:

  • 16. 

    What does the & character do when placed at the end of a command?

    • A.

      It allows another command to be entered on the same line.

    • B.

      It causes the process to be stopped.

    • C.

      It restarts a stopped process.

    • D.

      It causes the process to be placed into the foreground.

    • E.

      It causes the process to be placed into the background.

    Correct Answer
    E. It causes the process to be placed into the background.
    Explanation
    e. Using the & character puts a program in the background.

    Rate this question:

  • 17. 

    Which one of the following commands could be used to change all uppercase characters to lowercase in the middle of a pipe?

    • A.

      Grep

    • B.

      Egrep

    • C.

      Wc

    • D.

      Tr

    • E.

      Pr

    Correct Answer
    D. Tr
    Explanation
    d. The tr program translates characters from one group into another, including case.

    Rate this question:

  • 18. 

    What is the PID of init? Select one.

    • A.

      0

    • B.

      1

    • C.

      2

    • D.

      Undefined

    • E.

      Unknown

    Correct Answer
    B. 1
    Explanation
    b. init, the grandfather of all processes, always has PID 1.

    Rate this question:

  • 19. 

    Which one of the following outcomes results from the following command?# chmod g+s /home/software

    • A.

      The SUID bit will be set for /home/software.

    • B.

      The SGID bit will be set for /home/software, preventing access by those not a member of the software group.

    • C.

      The SGID bit will be set for /home/software, in order to keep group membership of the directory consistent for all files created.

    • D.

      The sticky bit will be set for /home/software.

    • E.

      The sticky bit will be applied to all files in /home/software.

    Correct Answer
    C. The SGID bit will be set for /home/software, in order to keep group membership of the directory consistent for all files created.
    Explanation
    c. The g indicates that we're operating on the group privilege, and the +s indicates that we should add the "set id" bit, which means that the SGID property will be applied.

    Rate this question:

  • 20. 

    Which one of the following commands is equivalent to the following command for user jdoe whose home directory is /home/jdoe?# chmod 754 ~/file1

    • A.

      Chmod u=rwx,g=rx,o=r /home/jdoe/file1

    • B.

      Chmod ugo=rwx ~/file1

    • C.

      Chmod u=7,g=5,o=4 ~/file1

    • D.

      Chmod 754 \home\jdoe\file1

    • E.

      Chmod 754 /usr/jdoe/file1

    Correct Answer
    A. Chmod u=rwx,g=rx,o=r /home/jdoe/file1
    Explanation
    a. User mode 7 is the same as u=rwx, group mode 5 is the same as g=rx, and other mode 4 is the same as o=r. The ~/ syntax implies the user's home directory.

    Rate this question:

  • 21. 

    What command and single required option creates a symbolic link in a Linux filesystem?

    • A.

      Ln -s

    • B.

      ...

    Correct Answer
    A. Ln -s
    Explanation
    The command "ln -s" creates a symbolic link in a Linux filesystem. This command is used to create a shortcut or reference to a file or directory. The "-s" option specifies that the link being created is a symbolic link.

    Rate this question:

  • 22. 

    What command can display the contents of a binary file in a readable hexadecimal form? Select one.

    • A.

      Xd

    • B.

      Hd

    • C.

      Od

    • D.

      Xd

    • E.

      Dump

    Correct Answer
    C. Od
    Explanation
    c. The octal dump program, when used with the -t x option, will output in hexadecimal notation.

    Rate this question:

  • 23. 

    Which one of the following commands copies files with the .txt extension from /dir1 into /dir2, while preserving file attributes such as dates?

    • A.

      Mv --copy /dir1/*.txt /dir2

    • B.

      Mv /dir1/*.txt /dir2

    • C.

      Cp -k /dir1/*.txt /dir2

    • D.

      Cp -p /dir1/*.txt /dir2

    • E.

      Cp -p /dir2 < /dir1/*.txt

    Correct Answer
    D. Cp -p /dir1/*.txt /dir2
    Explanation
    d. The -p, or preserve, option is required to retain dates.

    Rate this question:

  • 24. 

    Which one of the following file globs matches "Linux" and "linux," but not "linux.com" and not "TurboLinux"?

    • A.

      [L/linux]

    • B.

      ?inux

    • C.

      \L\linux

    • D.

      [Ll]inux

    • E.

      [Ll]inux?

    Correct Answer
    D. [Ll]inux
    Explanation
    d. The [Ll] matches both letters.

    Rate this question:

  • 25. 

    A process with PID 4077 is misbehaving on your system. As superuser, you enter the following command:# kill 4077However, nothing changes as a result. What can you do to terminate the process? Select one.

    • A.

      Kill -9 4077

    • B.

      Kill -1 4077

    • C.

      Kill +9 4077

    • D.

      Kill 4078

    • E.

      Kill --die 4077

    Correct Answer
    A. Kill -9 4077
    Explanation
    a. kill -9 is drastic but necessary for processes unable to respond to other signals.

    Rate this question:

  • 26. 

    Which one of the following key sequences is used to put a noninteractive text-mode program that is attached to the terminal into the background to allow it to continue processing?

    • A.

      Ctrl-C

    • B.

      Ctrl-B

    • C.

      Ctrl-B and then enter the bg command

    • D.

      Ctrl-Z

    • E.

      Ctrl-Z and then enter the bg command

    Correct Answer
    E. Ctrl-Z and then enter the bg command
    Explanation
    e. Ctrl-Z stops the job and gives control back to the terminal. bg places the job into the background and restarts it.

    Rate this question:

  • 27. 

    What basic command is used to create hard disk partitions?

    • A.

      Fdisk.

    • B.

      ...

    Correct Answer
    A. Fdisk.
    Explanation
    The basic command used to create hard disk partitions is fdisk. Fdisk is a command-line utility that allows users to create, delete, and manipulate disk partitions on a hard disk. It is commonly used in Linux and Unix systems to manage the partitioning of hard drives. With fdisk, users can create new partitions, specify their size and location, and set the partition type. It is a powerful tool for managing the storage space on a hard disk and organizing data effectively.

    Rate this question:

  • 28. 

    With a umask of 027, how is the initial mode set for a newly created file?

    • A.

      0750

    • B.

      0640

    • C.

      0027

    • D.

      1027

    • E.

      1640

    Correct Answer
    B. 0640
    Explanation
    b. By default, files do not have the execute privilege, which rules out all responses containing odd numbers in the mode. They also do not by default have the sticky bit set, which eliminates response e. Response b is the result of masking initial bits 666 with umask 027, leaving 640, which is the same as 0640.

    Rate this question:

  • 29. 

    Which one of the following commands verbosely extracts files from a tar archive on a magnetic tape device?

    • A.

      Tar cvf /dev/st0

    • B.

      Tar cvf /dev/ttyS0

    • C.

      Tar xvf /dev/st0

    • D.

      Tar xvf /dev/ttyS0

    • E.

      Tar rvf /dev/st0

    Correct Answer
    C. Tar xvf /dev/st0
    Explanation
    c. tar should be used with the extraction option x and a tape device, such as SCSI tape /dev/st0.

    Rate this question:

  • 30. 

    Alex wants to protect himself from inadvertently overwriting files when copying them with cp. How should he go about this?

    • A.

      Put alias cp='cp -i' in ~/.bashrc.

    • B.

      Put alias cp='cp -i' in ~/.bash_profile.

    • C.

      Put alias cp='cp -p' in ~/.bashrc.

    • D.

      Put alias cp='cp -p' in ~/.bash_profile.

    • E.

      Put alias cp='cp -I' in ~/.bashrc.

    Correct Answer(s)
    A. Put alias cp='cp -i' in ~/.bashrc.
    B. Put alias cp='cp -i' in ~/.bash_profile.
    Explanation
    a or b. cp should be aliased to the interactive mode with the -i option in .bashrc. .bash_profile normally doesn't include aliases, but it will also work.

    Rate this question:

  • 31. 

    Which one of the following utilities outputs a text file with line numbers along the left margin?

    • A.

      Tar

    • B.

      Wc

    • C.

      Tr

    • D.

      Nl

    • E.

      Ln

    Correct Answer
    D. Nl
    Explanation
    d. The nl command numbers lines.

    Rate this question:

  • 32. 

    Which one of the following is an accurate statement regarding this regular expression?[^1-8A-Za-z]

    • A.

      It matches all letters and numbers.

    • B.

      It matches all letters and numbers except 9.

    • C.

      It matches all letters and numbers except 9 and 0, but only at the beginning of a line.

    • D.

      It matches 9, 0, and other nonletter and nonnumber characters.

    • E.

      It matches characters other than letters or numbers.

    Correct Answer
    D. It matches 9, 0, and other nonletter and nonnumber characters.
    Explanation
    d. Brackets ([ ]) are used to group a character set consisting of numbers 18 and characters A-Z and a-z. The ^ just inside the opening bracket negates the whole string, such that the string matches numbers 0, 9, and symbols.

    Rate this question:

  • 33. 

    Monica consults the /etc/passwd file expecting to find encrypted passwords for all of the users on her system. She sees the following:jdoe:x:500:500::/home/jdoe:/bin/bash bsmith:x:501:501::/home/bsmith:/bin/tcsh Which of the following is true? Select one.

    • A.

      Accounts jdoe and bsmith have no passwords.

    • B.

      Accounts jdoe and bsmith are disabled.

    • C.

      The passwords are in /etc/passwd-

    • D.

      The passwords are in /etc/shadow

    • E.

      The passwords are in /etc/shadow-

    Correct Answer
    D. The passwords are in /etc/shadow
    Explanation
    d. The shadow password system has been implemented, placing all passwords in /etc/shadow as denoted by the x following the username.

    Rate this question:

  • 34. 

    What command (include applicable options) is used to initiate a change to runlevel 5?

    • A.

      Init 5. telinit 5 would also work, as they are both links to the same file.

    • B.

      ...

    Correct Answer
    A. Init 5. telinit 5 would also work, as they are both links to the same file.
    Explanation
    The command "init 5" is used to initiate a change to runlevel 5. This command is commonly used in Unix-like operating systems to switch to a multi-user graphical mode. The alternative command "telinit 5" can also be used, as it is a symbolic link to the same file as "init 5". Both commands will achieve the same result of transitioning to runlevel 5.

    Rate this question:

  • 35. 

    What does the "sticky bit" do? Select one.

    • A.

      It prevents files from being deleted by anyone.

    • B.

      It marks files for deletion.

    • C.

      It prevents files from being deleted by nonowners except root.

    • D.

      It prevents files from being deleted by nonowners including root.

    • E.

      It marks files for archive.

    Correct Answer
    C. It prevents files from being deleted by nonowners except root.
    Explanation
    c. The sticky bit in the mode prevents deletion by non-owners, but root can still delete the file.

    Rate this question:

  • 36. 

    Dave has a Linux system with an interrupt conflict caused by his 3c509 network card. Dave's kernel is fully modular. How could Dave instruct the system to use IRQ 11 for his network adapter?

    • A.

      Enter linux eth0=irq11 at the LILO boot loader prompt.

    • B.

      Enter linux 3c509=irq11 at the LILO boot loader prompt.

    • C.

      Add options 3c509 irq=11 to /etc/conf.modules.

    • D.

      Add options irq=11 3c509 to /etc/conf.modules.

    • E.

      Add ifup -irq 11 eth0 to /etc/rc.d/rc.sysinit.

    Correct Answer
    C. Add options 3c509 irq=11 to /etc/conf.modules.
    Explanation
    c. Since Dave is using a modular kernel, the network driver 3c509.o is a kernel module. LILO can send kernel parameters but not module parameters. These are stored in /etc/conf.modules.

    Rate this question:

  • 37. 

    What is contained in directory /sbin? Select the single best answer.

    • A.

      Commands needed in the event of a system emergency of interest to all system users.

    • B.

      Commands of interest to all system users.

    • C.

      Commands needed in the event of a system emergency of interest mainly to the administrator.

    • D.

      Commands of interest mainly to the administrator.

    • E.

      Libraries needed in the event of an emergency.

    Correct Answer
    C. Commands needed in the event of a system emergency of interest mainly to the administrator.
    Explanation
    c. While answers b and d are technically correct, answer c best describes /sbin.

    Rate this question:

  • 38. 

    What ext2 filesystem attribute allows a process to take on the ownership of the executable file's owner?

    • A.

      SUID.

    • B.

      ...

    Correct Answer
    A. SUID.
    Explanation
    SUID (Set User ID) is an ext2 filesystem attribute that allows a process to take on the ownership of the executable file's owner. When SUID is set on an executable file, the process that runs the file will have the same privileges as the owner of the file, regardless of the user who executed the file. This attribute is commonly used for programs that require elevated privileges to perform certain tasks, allowing regular users to execute them without compromising system security.

    Rate this question:

  • 39. 

    What is appended to the beginning of a command line in order to modify the execution priority of the resulting process?

    • A.

      Nice.

    • B.

      ...

    Correct Answer
    A. Nice.
    Explanation
    The command "nice" is appended to the beginning of a command line in order to modify the execution priority of the resulting process. By using the "nice" command, the user can adjust the priority level of a process, giving it a higher or lower priority compared to other processes running on the system. This allows the user to control the allocation of system resources and prioritize certain tasks over others.

    Rate this question:

  • 40. 

    How are the cat and tac commands related? Select one.

    • A.

      Cat displays files and tac does the same but in reverse order.

    • B.

      Cat concatenates files while tac splits a file into pieces.

    • C.

      Cat creates file catalogs while tac displays the catalogs.

    • D.

      The two commands are links to the same executable.

    • E.

      There is no relation or similarity between cat and tac.

    Correct Answer
    A. Cat displays files and tac does the same but in reverse order.
    Explanation
    a. cat concatenates files, and as a subset, will list one or more files to standard output. tac lists files in reverse order.

    Rate this question:

  • 41. 

    With regard to the use of regular expressions to match text in a file, describe a metacharacter. Select one.

    • A.

      They are standard text characters used in the regular expression.

    • B.

      They are special control characters used in the regular expression.

    • C.

      They are used to display results after using a regular expression.

    • D.

      They are used by the shell to display graphics.

    • E.

      Metacharacters aren't used in regular expressions.

    Correct Answer
    B. They are special control characters used in the regular expression.
    Explanation
    b. A metacharacter is a special character that is used to modify and control the interpretation of literals. File globbing is generally considered distinct but very similar to the use of regular expressions.

    Rate this question:

  • 42. 

    How many IDE devices can be installed and simultaneously used in a typical Intel-based system? Select one.

    • A.

      1

    • B.

      2

    • C.

      3

    • D.

      4

    • E.

      5

    Correct Answer
    D. 4
    Explanation
    d. PCs usually have two IDE interfaces, each capable of handling two devices.

    Rate this question:

  • 43. 

    Consider the following line of console output, excerpted from among other lines of output. Which one of the commands produced it?/dev/hda8 1.9G 559M 1.2G 30% /home

    • A.

      Du -s

    • B.

      Du -k

    • C.

      Df -h

    • D.

      Df -k

    • E.

      Df -m

    Correct Answer
    C. Df -h
    Explanation
    e. A filesystem without free inodes cannot create new objects until existing objects are removed.

    Rate this question:

  • 44. 

    Which one of the following would be a consequence of a filesystem running out of inodes?

    • A.

      More inodes would be automatically created in the filesystem.

    • B.

      Quotas would become disabled on the filesystem.

    • C.

      The filesystem would be corrupted.

    • D.

      The filesystem would be marked read-only.

    • E.

      No writes would be possible on the filesystem until existing files were deleted.

    Correct Answer
    E. No writes would be possible on the filesystem until existing files were deleted.
    Explanation
    c. This is an example line from the output of df -h, the "human-readable" mode of df.

    Rate this question:

  • 45. 

    Which one of the following is true about the LILO boot loader?

    • A.

      It can start the Windows NT Loader.

    • B.

      It is started using the lilo command.

    • C.

      It is the only boot loader available for Linux.

    • D.

      It can start multiple Linux kernels, but no foreign operating systems.

    • E.

      It resides entirely in the boot sector.

    Correct Answer
    A. It can start the Windows NT Loader.
    Explanation
    a. LILO can start the Windows NT boot loader and many other operating systems.

    Rate this question:

  • 46. 

    Which one of the following statements correctly describes the > and >> symbols in the context of the bash shell?

    • A.

      > appends standard output to an existing file, and >> writes standard output to a new file.

    • B.

      > writes standard output to a new file, and >> appends standard output to an existing file.

    • C.

      > writes standard error to a new file, and >> appends standard error to an existing file.

    • D.

      > pipes standard output to a new file, and >> pipes standard output to an existing file.

    • E.

      > pipes standard output to an existing file and >> pipes standard error to a new file.

    Correct Answer
    B. > writes standard output to a new file, and >> appends standard output to an existing file.
    Explanation
    b. The > character opens and writes to a new file, while >> appends to an existing file, unless that file doesn't exist, in which case it is opened first.

    Rate this question:

  • 47. 

    What is the correct syntax to remove mypkg entirely from a Debian GNU/Linux system, including configuration files? Select one.

    • A.

      Dpkg -r mypkg

    • B.

      Dpkg --remove mypkg

    • C.

      Dpkg --kill mypkg

    • D.

      Dpkg -R mypkg

    • E.

      Dpkg --purge mypkg

    Correct Answer
    E. Dpkg --purge mypkg
    Explanation
    e. The --purge option is a variant of -r, remove.

    Rate this question:

  • 48. 

    Your system's FontPath directives include only one entry:unix/:-1 Which of the following is true? Select one.

    • A.

      Error -1 has occurred during X startup

    • B.

      Only the default font will be available to applications

    • C.

      An X font server is to be used

    • D.

      An X font server failed to initialize

    • E.

      No fonts were found by XFree86 or by a font server

    Correct Answer
    C. An X font server is to be used
    Explanation
    c. The directive indicates that a font server should listen on its default port.

    Rate this question:

  • 49. 

    How do you use dpkg to verify the status of an installed package mypkg? Select one.

    • A.

      Dpkg -s mypkg

    • B.

      Dpkg -S mypkg

    • C.

      Dpkg -stat mypkg

    • D.

      Dpkg --stat mypkg

    • E.

      Dpkg --Status mypkg

    Correct Answer
    A. Dpkg -s mypkg
    Explanation
    a. The appropriate option is either -s or --status.

    Rate this question:

  • 50. 

    Which of the following statements is true about an X server? Select one.

    • A.

      An X server is a high-performance system offering graphical programs over a network.

    • B.

      An X server sends its graphical output to a window manager.

    • C.

      An X server is under the control of a window manager.

    • D.

      A window manager is under the control of an X server.

    • E.

      A window manager is also known as an X server.

    Correct Answer
    D. A window manager is under the control of an X server.
    Explanation
    d. A window manager is a client, controlled by the X server. Answers a and b are incorrect because they imply that the X server originates the graphical output. Answers c and e are common misconceptions.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Aug 19, 2010
    Quiz Created by
    Mariiikar
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.