Linux MCQ-06: Boot Process and Scripts

The assessment test is an excellent way to test yourself before starting to study. It gives you an idea of where you should start and why.

Table of Contents

In an assessment test, test your current skills from beginning to advance lever for any subject or topic to check “what do you know and from where you should start learning?”

Here I have put some basic questions for Linux assessment, so you can test your Linux skill and choose right path for Linux Learning.


1.    What would you expect to see if you type uname -a?

  1. Information on the username of the current user, including the user’s real name
  2. Information on the running system, such as the OS, the kernel version, and the CPU type
  3. Information on the computer’s hostname, as it’s defined locally
  4. Information on the loaded kernel modules, including the modules upon which they depend

2.    What line in /etc/inittab would indicate that your default runlevel is 5?

  1. ca:12345:ctrlaltdel:/sbin/shutdown –t1 –a –r now
  2. id:5:initdefault:
  3. si:5:sysinit:/etc/init.d/rc5
  4. ls:5:wait:/etc/init.d/rc 5

3.    What is the most important practical difference between insmod and modprobe?

  1. Insmod unloads a single module, whereas modprobe loads a single module.
  2. Insmod loads a single module, whereas modprobe loads a module and all those upon which it depends.
  3. Insmod isn’t a real Linux command, but modprobe loads a module and all those upon which it depends.
  4. Insmod loads a single module, whereas modprobe displays information about modules.

4.    Which runlevels are reserved by init for reboot, shutdown, and single user mode purpose?

  1. 0
  2. 1
  3. 5
  4. 6

5.    You type the command rmmod ide_core, but the system responds with the message ERROR: Module ide_core is in use by via82cxxx, ide_cd, ide_disk. What is the meaning of this response?

  1. The via82cxxx, ide_cd, and ide_disk modules all rely on ide_core, so ide_core can’t be unloaded without first unloading these other modules.
  2. The ide_core module relies on via82cxxx, ide_cd, and ide_disk modules, so they can’t be unloaded without first unloading ide_core.
  3. The ide_core module is a core module, meaning that it can never be unloaded once it’s loaded.
  4. The ide_core module is buggy or the rmmod utility is broken; it should never return an error message.

6.    You type the following command:

            $ runlevel

            5 3

            What can you tell about your runlevel status? [Select all that apply.]

  1. The current runlevel is 5
  2. The current runlevel is 3
  3. The previous runlevel is 5
  4. The previous runlevel is 3

7.   What fileor files might you edit to change the options that are automatically passed to kernel modules? [Select all that apply.]

  1. Files in the /etc/modules.d directory
  2. Modules.dep in the modules directory
  3. .config in the kernel directory
  4. /etc/modules.conf

8.    What is the best location for the current directory indicator (.) to reside in root’s PATH environment variable?

  1. Before all other directories.
  2. After all other directories.
  3. Nowwhere; it shouldn’t be in root’s path.
  4. Wherever is convenient.

9.    Which of the following commands would you type to configure a Linux kernel using an interactive text-mode tool?

  1. make xconfig
  2. make menuconfig
  3. make config
  4. make textconfig

10.    You want to create a shortcut for the command cd ~/papers/trade. Which of the following lines, if entered in a bash startup script, will accomplish this goal?

  1. alias cdpt=’cd ~/papers/trade’
  2. export cdpt=’cd ~/papers/trade’
  3. cd ~/papers/trade
  4. shortcut cdpt “cd ~/papers/trade’

11.    Which of the following kernel features should you compile into the main kernel file of a regular disk-based installation to simplify booting the system? [Select all that apply.]

  1. Drivers for your boot disk’s ATA controller or SCSI host adapter
  2. Support for your root (/) filesystem
  3. Drivers for your RS-232 serial port
  4. Drivers for your CD-ROM drive

12.    In what environment variable is the current working directory stored?

  1. PATH
  2. CWD
  3. PWD

13.    What is the conventional name for a locally compiled Linux kernel on an x86 system?

  1. /boot/kernel-version
  2. /boot/vmlinuz
  3. /boot/bzImage-version
  4. /boot/src/linux-version

14.    Which of the following commands, if typed in a bash shell, will create an environment variable called MYVAR with the contents mystuff?

  1. export MYVAR=’mystuff’
  2. MYVAR=’mystuff”
  3. $MYVAR==mystuff
  4. echo $MYVAR mystuff

15.    Where might the BIOS find a boot loader?

  1. RAM
  2. /dev/boot
  3. MBR
  4. /dev/kmem

16.    After using a text editor to create a shell script, what step should you take before trying to use the script?

  1. Set one or more executable bits using chmod.
  2. Copy the script to the /usr/bin/scripts directory.
  3. Compile the script by typing bash scriptname, where scriptname is the script’s name.
  4. Run a virus checker on the script to be sure it contains no viruses.

17.    Which of the following is the LILO boot loader configuration file?

  1. /dev/lilo
  2. The MBR
  3. /boot/lilo/lilo.conf
  4. /etc/lilo.conf

18.    Describe the effect of the following short script, cpl, if it’s called as cpl big.c


               Cp $2 $1

  1. It has the same effect as the cp command –copying the contents of big.c to
  2. It compiles the C program big.c and calls the result
  3. It copies the contents of to big.c, eliminating the old big.c.
  4. It converts the C program big.c into a C++ program called

19.    Which command is used to install GRUB into the MBR of your first ATA hard drive?

  1. grub (hd0,1)
  2. grub-install /dev/hda1
  3. lilo /dev/had
  4. grub-install /dev/had

20.    What is the purpose of conditional expressions in shell scripts?

  1. They prevent scripts from executing if license conditions aren’t met.
  2. They display information on the script’s computer environment.
  3. They enable the script to take different actions in response to variable data.
  4. They enable scripts to learn in a manner reminiscent of Pavlovian conditioning.


1.   b

2.   a

3.   b

4.   c

5.   d

6.   b

7.   b, c

8.   a

9.   a

10.   c

11.   b

12.   a, d

13.   a, b

14.   c

15.   d

16.   a, b, d

17.   c

18.   c

19.   a

20.   c


Submit a Comment

Your email address will not be published. Required fields are marked *

3 × 2 =

Related Articles