Chapter 2 Review

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 Meenupriya
M
Meenupriya
Community Contributor
Quizzes Created: 1 | Total Attempts: 140
Questions: 25 | Attempts: 140

SettingsSettingsSettings
Chapter 2 Review - Quiz

Fundamentals of Operating System - Disk Partitions, File System and related commands


Questions and Answers
  • 1. 

    You receive a message that you’ve successfully backed up hda2 on your Linux system. What is hda2?

    • A.

      2nd disk on a 2 disk system

    • B.

      2nd partition on your main HD

    • C.

      The files on a CD

    • D.

      Subdirectory under root that houses backup

    Correct Answer
    B. 2nd partition on your main HD
    Explanation
    Hda2 refers to the 2nd partition on the main hard drive of the Linux system. This means that the hard drive has been partitioned into multiple sections, and hda2 specifically represents the second partition.

    Rate this question:

  • 2. 

    You have purchased a special monitor for your computer and the instructions tell you to make a minor modification to the inittab file. Where would you locate this file on a typical Linux system?

    • A.

      /var

    • B.

      /fastboot

    • C.

      /home/users

    • D.

      /etc

    Correct Answer
    D. /etc
    Explanation
    The inittab file is typically located in the /etc directory on a Linux system. This directory contains system configuration files, including important files related to the initialization process. Therefore, it is the most likely location for the inittab file, as mentioned in the instructions for the special monitor.

    Rate this question:

  • 3. 

    While you are typing a command, you misspell the name of a file you want to specify with the command. Which of the following command line key combinations enables you to go back and fix your error?

    • A.

      Alt+a

    • B.

      Alt+b

    • C.

      Ctl+a

    • D.

      Ctl+b

    Correct Answer
    D. Ctl+b
    Explanation
    The correct answer is ctl+b. Pressing the "ctl" (control) key and the "b" key together allows you to move the cursor back one character at a time, giving you the ability to fix the misspelled file name in the command.

    Rate this question:

  • 4. 

    You haven’t changed your user account password for several months and now decide to create a new password. Which of the following commands should you use?

    • A.

      Password

    • B.

      Pword

    • C.

      Passwd

    • D.

      Psswd

    Correct Answer
    C. Passwd
    Explanation
    The correct answer is "passwd." The "passwd" command is used to change the user account password in Unix-like operating systems. By using this command, you can create a new password for your user account. The other options provided ("password," "pword," and "psswd") are not valid commands for changing the password.

    Rate this question:

  • 5. 

    The default command interpreter for Linux is ----------------

    Correct Answer
    Bash shell
    Explanation
    The default command interpreter for Linux is the Bash shell. Bash stands for "Bourne Again SHell" and it is a widely used command-line interpreter that provides a user interface for executing commands and managing the operating system. It is the default shell for most Linux distributions due to its powerful features, extensive support, and compatibility with the POSIX standard. Bash shell allows users to interact with the Linux system, run scripts, and perform various administrative tasks efficiently.

    Rate this question:

  • 6. 

    You’re frantically trying to get ready for a meeting and want to access a file in your home directory, but you are currently working in a public directory open to all users. What command can you enter to instantly go to your home directory?

    Correct Answer
    cd ~
    Explanation
    The command "cd ~" is used to instantly go to the home directory. The "~" symbol represents the user's home directory, so when this command is entered, it changes the current directory to the user's home directory. This allows the user to quickly access the file they need for the meeting without having to navigate through the entire directory structure.

    Rate this question:

  • 7. 

    Your new colleague asks which partitions vendors recommend setting up on a Linux system. Which of the following partitions do you include in your response?

    • A.

      Root

    • B.

      Swap

    • C.

      /boot

    • D.

      All the above

    Correct Answer
    D. All the above
    Explanation
    The correct answer is "all the above" because vendors typically recommend setting up multiple partitions on a Linux system. The root partition is where the operating system and system files are stored, the swap partition is used for virtual memory, and the /boot partition contains the bootloader and kernel files. Having separate partitions for these components can help with system stability, security, and performance.

    Rate this question:

  • 8. 

    You have mounted a remote network drive and now you want to unmount that drive. Which of the following commands do you use? (Choose all that apply.)

    • A.

      Unmount

    • B.

      Umount

    • C.

      Driveoff

    • D.

      Disconnect

    Correct Answer
    B. Umount
    Explanation
    Mount Command:

    Used to connect files to directory tree.
    Any file that is mounted can be and can only be accessed

    mount [-option] [device-name mount point]

    Eg., mount -t iso9660 /dev/cdrom /mnt/cdrom -t specifies if there is mounting type

    mount -t file system /dev/fd0 /mnt/floppy
    The device is accessed through the mounting point at /mnt or at /media

    Rate this question:

  • 9. 

    When you connect a printer via a USB port on your Linux computer, which type of device special file is used to handle streams of data sent to and from the printer?

    • A.

      Character special file

    • B.

      Block special file

    • C.

      Root device file

    • D.

      Port device file

    Correct Answer
    A. Character special file
    Explanation
    When you connect a printer via a USB port on your Linux computer, the type of device special file used to handle streams of data sent to and from the printer is a character special file. A character special file is a type of special file that allows for the transfer of data one character at a time, making it suitable for devices that require streaming data, such as printers.

    Rate this question:

  • 10. 

    Some of the users in your company create and delete so many files that they have problems with fragmented disks. Which of the following new features in the ext4 file system help to reduce fragmentation problems?

    • A.

      Hot swap

    • B.

      Fragmonitor

    • C.

      Smaller file sizes

    • D.

      Extents

    Correct Answer
    D. Extents
    Explanation
    Unix File System (ufs)
    --------------------------------
    Advantages:
    Expandable
    Supports large amount of storage
    Excellent security
    Reliable
    Supports Journaling
    Supports hot fixes

    Ext fs is dafault and modeled after ufs
    Ext1 - did not support journaling and had bugs;
    Ext2 - reliable and large disk storage
    Ext3 - has journaling
    Ext4 - allows single volume storage upto 1 Exabyte (> 1.1 quintillion of bytes, nearly 10^18 in decimal) and enable extent use

    Rate this question:

  • 11. 

    In UNIX and Linux systems, what source of extra memory space is used when working on tasks and files that exceed the RAM capacity on chips in the computer?

    • A.

      Register memory

    • B.

      Swap partition

    • C.

      /mem directory

    • D.

      /users/mem

    Correct Answer
    B. Swap partition
    Explanation
    In UNIX and Linux systems, when working on tasks and files that exceed the RAM capacity, a swap partition is used as a source of extra memory space. A swap partition is a dedicated portion of the hard drive that is used as virtual memory to temporarily store data that cannot fit in the RAM. This allows the system to continue functioning even when the RAM is fully utilized, by swapping data between the RAM and the swap partition as needed.

    Rate this question:

  • 12. 

    You are always scheduled for two or three meetings each day and need to keep an eye on the time. What PS1 variable parameter can you set in order to have your command prompt display the current time?

    • A.

      \t

    • B.

      \v

    • C.

      /time

    • D.

      /date

    Correct Answer
    A. \t
    Explanation
    echo $PS1 - shows the prompt configuration

    characters being with \ are special shell formatting characters.
    Eg. \u - prints username
    -h - hostname
    \W - current working directory
    \$ prints $ for normal users and # for administrator
    [ ] and white space - are not special characters so printed as it is.

    Eg.$ echo $PS1 will show something like

    \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}meenu:\w\$ - in debian or ubuntu

    or as [\u@\h \W]\$

    will display as [meenu@my ~/Documents]$

    this can be changed with
    export PS1="[\u@\t \W]$" - add this line at the end of your $HOME/.bashrc file
    then run
    source $HOME/.bashrc

    Other variables to configure - path, pwd, prompt, shell

    Rate this question:

  • 13. 

    A member of your department has given you permissions to view the contents of the accounting directory under her home directory. The name of her home directory is sweet. Which of the following commands should you use to display the contents of the accounting directory?

    • A.

      Dir accounting

    • B.

      Ls /home/sweet/accounting

    • C.

      Ls ~/accounting

    • D.

      Cd -l /sweet/accounting

    Correct Answer
    B. Ls /home/sweet/accounting
    Explanation
    The correct command to display the contents of the accounting directory is "ls /home/sweet/accounting". This command uses the "ls" command to list the contents of a specific directory, in this case, the accounting directory located under the home directory named "sweet". The "/home/sweet/accounting" specifies the exact path to the directory.

    Rate this question:

  • 14. 

    It’s late and you have been working all day to finish a report. Before you go home you want to copy several files including your report file. What copy command should you use to ensure that you don’t inadvertently copy an older report file over the newer report file you’ve been working on for the last four hours?  cp -u

    • A.

      Cp --warn

    • B.

      Copy -w

    • C.

      cp -u

    • D.

      Copy --caution

    Correct Answer
    C. cp -u
    Explanation
    The correct answer is "cp -u". The -u option in the cp command stands for "update". When used with the cp command, it ensures that only files that are newer or do not exist in the destination directory are copied. This means that if you use the cp -u command to copy your report file, it will not copy an older report file over the newer one that you have been working on for the last four hours.

    Rate this question:

  • 15. 

    Which of the following are file systems supported by UNIX and Linux operating systems? (Choose all that apply.)

    • A.

      NTFS

    • B.

      Vfat

    • C.

      Ufs

    • D.

      Ext

    • E.

      All the above

    Correct Answer
    E. All the above
    Explanation
    UNIX and Linux operating systems support multiple file systems, including NTFS, vfat, ufs, and ext. Therefore, the correct answer is "all the above."

    Rate this question:

  • 16. 

    Your boss is planning to do some house cleaning by deleting several old files. However, she mentions that she doesn’t want to delete an important file inadvertently. What command can she use so that she is prompted to make sure she wants to delete a particular file?

    • A.

      Del ?

    • B.

      Write -del -q

    • C.

      Rm -i

    Correct Answer
    C. Rm -i
    Explanation
    The correct answer is "rm -i". The "rm" command is used to remove files, and the "-i" option stands for "interactive", which prompts the user for confirmation before deleting each file. This ensures that the boss will be asked for confirmation before deleting any file, preventing the accidental deletion of important files.

    Rate this question:

  • 17. 

    A friend of yours is trying to make more space on his hard disk drive and is considering deleting the /lib directory because he has heard it mostly contains games that he doesn’t use. What is your recommendation?

    • A.

      Go ahead and delete but before deletion, copy its contents elsewhere

    • B.

      Delete /mnt directory instead

    • C.

      Keep the /lib directory because it holds security information, shared library images, kernel modules and other important files

    Correct Answer
    C. Keep the /lib directory because it holds security information, shared library images, kernel modules and other important files
    Explanation
    The /lib directory should be kept because it contains important files such as security information, shared library images, and kernel modules. Deleting this directory could potentially cause issues with the functioning of the operating system and other software on the hard disk drive. It is not advisable to delete the /lib directory without understanding its significance and potential consequences.

    Rate this question:

  • 18. 

    You are curious about the error and system logs kept by your operating system. In what main directory under the root (/) would you most likely find these logs?

    • A.

      /sbin

    • B.

      /tmp

    • C.

      /var

    • D.

      /sys

    Correct Answer
    C. /var
    Explanation
    System logs and error logs are typically stored in the /var directory. This directory is commonly used to store variable data such as log files, temporary files, and system-related information. The /sbin directory contains system binaries and administrative commands, the /tmp directory is used for temporary files, and the /sys directory contains information about the system's hardware and devices. However, the most likely location for logs would be the /var directory.

    Rate this question:

  • 19. 

    You have created many notes to yourself that end in .txt. Which of the following commands enables you to list all of the .txt files in your home directory while you are in the Bash shell?

    • A.

      Dir ##.txt

    • B.

      Ls *.txt

    • C.

      Cp .txt -all

    • D.

      Cat $.txt

    Correct Answer
    B. Ls *.txt
    Explanation
    The correct answer is "ls *.txt". The "ls" command is used to list files and directories. Adding "*.txt" after "ls" specifies that we want to list all files with the extension ".txt". This command will display a list of all the .txt files in the current directory.

    Rate this question:

  • 20. 

    Which command enable you to set permissions on a directory after you create it?

    Correct Answer
    chmod
    Explanation
    Can also use the format $chmod ugo+rwx filename

    Rate this question:

  • 21. 

    Where is virtual memory located?

  • 22. 

    You have many files that begin with the word “account” and that end with two digits to designate a year, such as account00, account 01, and so on. What is the command that enables you to view all of these files that start with account?

    • A.

      Ls *

    • B.

      Ls account**

    • C.

      Ls account??

    • D.

      Ls account!!

    Correct Answer
    C. Ls account??
    Explanation
    The correct answer is "ls account??". This command uses the wildcard character "?" to match any single character, so it will display all files that start with "account" and have two more characters after that.

    Rate this question:

  • 23. 

    When your system boots, it reads a list of mounting instructions from 

    • A.

      /etc/fstab

    • B.

      /dev/

    • C.

      /mnt/

    Correct Answer
    A. /etc/fstab
    Explanation
    When a system boots up, it reads a list of mounting instructions from the /etc/fstab file. This file contains information about the file systems and partitions that should be mounted at boot time, including their device names and mount points. By reading this file, the system knows which file systems to mount and where to mount them, ensuring that all necessary file systems are available for use after booting up.

    Rate this question:

  • 24. 

    Your company is discussing plans to migrate desktop and laptop users to Linux. One concern raised by the users is whether Linux supports the use of CDs and DVDs for both work files and for listening to music. Which of the following is an appropriate answer?

    • A.

      User can copy music files to HD to play

    • B.

      Reiser File System of Linux supports CD & DVD files of all types

    • C.

      Users can mount CDs and DVDs using /removable partition

    • D.

      Linux supports both the UDF and iso9660 file systems for CD and DVD use

    Correct Answer
    D. Linux supports both the UDF and iso9660 file systems for CD and DVD use
    Explanation
    HPFS - High Performance Files System - to use with os/2 operating system
    JFS - Journaled File System (by IBM) - larger files, dynamic inode allocation for better use of free space
    MS-DOS - compatibility with FAT12 & FAT16 to read floppy disks made in windows
    NFS - Sun Microsystem for unix systems for networking and sharing of files
    NTFS - used by windows
    Reiser FS - by Hans Reiser; Similar to ext3 & ext4 (with journaling) but 15 times faster than these; handles small files and encourages efficient coding through small files
    UDF - Universal Disk Format - for CD & DVD use replacing iso9660 (supported by Unix/Linux, Windows, Mac)
    Vfat - compatible with FAT32 - for long file names

    Rate this question:

  • 25. 

    New users can be added using the command

    • A.

      Useradd

    • B.

      Adduser

    • C.

      Add -user

    Correct Answer(s)
    A. Useradd
    B. Adduser
    Explanation
    The correct answer is useradd, adduser. These are the command options that can be used to add new users. The "useradd" command is used to create a new user account, while "adduser" is a higher-level command that provides a more user-friendly interface for adding new users. Both commands serve the same purpose of adding new users to the system.

    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
  • Feb 11, 2012
    Quiz Created by
    Meenupriya

Related Topics

Back to Top Back to top
Advertisement