Linux – Multiple Choice Questions – MCQ – 391 to 420 Questions with Explanation

391. Which script is run when X Window starts?

A. .xinit
B. .xrc
C. .startxrc
D. .xinitrc

Answer – – D
Description – The .xinitrc script is run from your home directory when startx is called. The other script names are invalid.

392. Which command adds a new default route to the system?

A. ifconfig add default gw
B. route add gw
C. route add default gw
D. ifconfig add mask gw

Answer – – C
Description – The ifconfig command is used to configure an interface, not a route.

393. Dave is going away on vacation for two weeks and wants his mail forwarded to Sue while he is away. Which change should he make?

A. Add “sue” to /etc/aliases.
B. Add “sue” to ~/.forward.
C. Add “sue” to ~/.aliases.
D. Add a rule to pine to forward the mail.

Answer – – B
Description – Only root can change /etc/aliases. Answers C and D are invalid.

394. The Samba daemon responsible for handling name resolution is which of the following?

A. nmbd
B. smbd
C. winsd
D. named

Answer – – A
Description – The smbd daemon handles file and printer sharing. Answer C is invalid. The named daemon is used to provide DNS.

395. The _______ command can be used to change to another user.

Answer – – su
Description – The su, or substitute user, command is used to change to another user while logged in.

396. Which command should be used to allow the host norbert to connect to the local X server?

A. xhost +
B. cat norbert > .rhosts
C. xhost +norbert
D. rhosts +norbert

Answer – – C
Description – Choice A allows anyone to connect, which is a security risk. The X server does not use the rhosts file. Choice D is invalid.

397. You have just configured a new mail server named deathstar. Which entry should you make into DNS to make this the primary mail server?

A. IN MX 20 deathstar
B. IN MX 10 deathstar
C. IN MX 0 deathstar
D. IN MX 100 deathstar

Answer – – C
Description – The lower the number is, the higher the priority of the mail server.

398. Which command would you use to copy the /Documents directory and all subdirectories from the current system to the remote system newman?

A. cp -R /Documents newman:/
B. scp -r /Documents root@newman:/
C. rcp -R /documents newman:/
D. scp -R root@newman:/ /Documents

Answer – – B
Description – The cp tool only works locally. Choice C uses the wrong path name, and choice D has incorrect syntax.

399. Which command would update your Debian system to the latest version of all installed packages?

A. apt-get update ; apt-get upgrade
B. apt-get upgrade ; apt-get update
C. apt-get refresh
D. apt get update ; apt get upgrade

Answer – – A
Description – The update command is first used to update the available package list, and then the upgrade command is used to actually upgrade the packages.

400. You have set up a new mail server behind your firewall. You now need to open up port _____ for access to work.

Answer – – 25
Description – The SMTP protocol uses port 25.

401. The _______ tool outputs a file showing the PnP configuration of the system.

Answer – – pnpdump
Description – This tool is used to scan the system and output any Plug-and-Play information to a text file for configuration.

402. What does the following IP chains block accomplish? (Select all that apply.)
ipchains -F input
echo 1 > /proc/sys/net/ipv4/ip_forward
ipchains -A output -src -dst ! -j MASQ
ipchains -A input -dst -j ACCEPT

A. The network is being masq’d.
B. IP forwarding is disabled.
C. IP forwarding is enabled.
D. Access to is allowed.

Answer – – C and D
Description – IP Masq is not functioning since the rule must be set in the Forward chain. The second line enables IP forwarding.

403. Which of the following directories should be on their own partition? (Select all that apply.)

A. /usr
B. /boot
C. /home
D. /tmp

Answer – – A, B, C and D
Description – In most cases all of the directory structures should have their own partition for security and fault tolerance.

404. The ________ command provides an easy-to-use interface to Debian package management.

Answer – – dselect
Description – The dselect tool is an easy-to-use front end for dpkg.

405. Which command(s) would be used to display which kernel packages are installed on your system?

A. rpm -ql | grep kernel
B. rpm -qa | grep kernel
C. dpkg -l kernel
D. dpkg -l | grep kernel

Answer – – B and D
Description – Answer – A is invalid, since no query string is present. Answer C will only display a package with the exact name “kernel”.

406. To use the X11 graphical interface to make a kernel configuration, you would use which of the following?

A. make gconfig
B. make xconfig
C. make menuconfig
D. make tclconfig

Answer – – B
Description – Answers A and D are invalid. The make menuconfig command provides a text mode menu.

407. After editing the /etc/lilo.conf file, you must run the _________ command.

Answer – – lilo
Description – You must rerun lilo after editing /etc/lilo.conf so that a new boot record is written with the updated information.

408. If you want to remotely display an X Window application to another system, which option would you use?

A. -display
B. -connect
C. -remote
D. -xhost

Answer – – A
Description – The -display parameter tells the application where to connect to for its output display. The other Answers are invalid.

409. You have a Red Hat system that currently boots in text mode. Which file do you need to modify to have it boot in GUI mode?

A. /etc/runlevel
B. /etc/init.conf
C. /etc/inittab
D. /etc/xdm

Answer – – C
Description – The inittab file tells the system which runlevel to boot to by default. In Red Hat, runlevel 3 is text mode and runlevel 5 is GUI mode. The other Answers are invalid.

410. The ______ file stores the monitor information for X Window v4 (no path).

Answer – – XF86Config-4.
Description – XFree86 v3 uses the XF86Config file.

411. Which X11 application is known to have memory leaks?

A. Netscape
B. Internet Explorer
C. Sawfish
D. WindowMaker

Answer – – A
Description – Netscape is known to have stability problems and memory leaks.

412. The _______ command displays all e-mail messages waiting in the mail queue.

Answer – – mailq.
Description – The mailq command shows all messages in the mail queue, as well as any errors that may keep the messages from being delivered.

413. Given the following files, would the host norbert be allowed to connect to the FTP server?
hosts.deny: in.ftpd : ALL
hosts.allow: in.ftpd : norbert

A. Yes
B. No

Answer – – A
Description – While the hosts.deny rule blocks everyone, the hosts.allow rule overrides it.

414. Which type of modem is usually not compatible with Linux?

A. Internal
B. External
C. Integrated
D. Winmodem

Answer – – D
Description – Winmodems use software to handle most of their functionality, which is not supported in Linux due to lack of information from which to write drivers.

415. You need to access a resource named Documents shared by the NFS server bigserver. Which command would you use?

A. mount -t nfs //bigserver/Documents /mnt/docs
B. mount bigserver:Documents /mnt/docs
C. mount -t nfs bigserver:/Documents /mnt/docs
D. nfsmount bigserver:Documents /mnt/docs

Answer – – B
Description – The mount command uses the syntax server:share mount_point for NFS shares.

416. After updating the /etc/exports file, the _______ command must be run for it to take effect (with option(s)).

Answer – – exportfs -a.
Description – The exportfs command is used to control the directories shared via NFS. The -a option tells exportfs to share or unshare all configured directories.

417. When examining the network logs for the firewall, you notice a lot of connection attempts to port 110. Which service may your remote users be trying to use?


Answer – – C
Description – IMAP uses port 143, DNS uses port 53, and SMTP uses port 25.

418. After editing the /etc/modules.conf file you should run the ________ command.

Answer – – depmod.
Description – The depmod command sets up the module dependency links.

419. The first line of a shell script should be which of the following?

A. !#/bin/sh
B. #!bash
C. #!/usr/bin/bash
D. #!/bin/bash

Answer – – D
Description – The other Answers are invalid.

420. User application defaults are stored in which file?

A. Xresources
B. .Xdefaults
C. .xinit
D. .xinitrc

Answer – – B
Description – The Xdefaults file lists the default settings for X applications, as configured by the user. The xinit and xinitrc scripts are used to start X.

For Linux MCQ 1 – 30 | Main Linux MCQ Page

You may also like:

Sarcastic Writer

Step by step hacking tutorials about wireless cracking, kali linux, metasploit, ethical hacking, seo tips and tricks, malware analysis and scanning.

Related Posts