These Linux multiple-choice questions and their answers will help you strengthen your grip on the subject of Linux. You can prepare for an upcoming exam or job interview with these Linux MCQs.
So scroll down and start answering.
A. Penguin
B. Gecko
C. Elephant
D. Hat
A. Nothing.
B. An error (/dev/null can only be written to, not read from).
C. An infinite string of zeroes ('0', ASCII 0x30).
D. An infinite string of nulls ('\0', ASCII 0x00).
A. It checks to see if the bash shell exists on the machine.
B. It makes sure that the script runs in the bash shell.
C. all of these
A. /etc/passwd
B. /etc/master.passwd
C. /etc/shadow
D. /etc/passwdinfo
E. /etc/password
A. a certain machine
B. a certain date
C. a certain network
D. a certain holiday
A. Grand Unified Bootloader
B. Gum Removal Under Boot
C. Great Ultimate Bootloader
D. Great Unique Bootloader
E. Grand Unification Bootloader
A. lists background jobs
B. provides basic accounting information for all current jobs
C. halts all foreground jobs
D. prints a dedication to Steve Jobs
E. puts all foreground jobs in the background
A. -c
B. #NAME?
C. -r
D. -R
A. //mkdir text
B. mkdir text # make a directory
C. mkdir text //make a directory
A. /bin/runlev
B. /etc/inittab
C. /bin/rlev
D. /sys/rinit
E. /etc/syslev
A. /etc/rlevel
B. /etc/hosts
C. /etc/mtab
D. /etc/crontab
E. /etc/inittab
A. topf
B. start
C. head
D. ftop
A. date where the kernel was built
B. cpu info
C. All of the answers are correct.
D. kernel info
E. architecture
A. nothing
B. moves the root home directory
C. moves the current home directory
D. Traverse two directories up the directory tree.
E. wil be error
A. Minix
B. System V
C. Hurd
D. GNU
E. BSD
A. routing tables
B. all are correct
C. active sockets
D. open sockets
A. bash
B. sh
C. All of these
D. csh
A. modules
B. lsattr
C. lsmod
D. listmodules
A. all are correct
B. character file
C. fifo (pipe) file
D. block file
A. Security Shell
B. Synchronous Shell
C. Secure Shell
D. Super Shell
E. System Shell
A. &
B. ;
C. :
A. It is the synchronous shell: all commands are performed in real-time.
B. It is the secure shell; it is used to connect to remote hosts via an authenticated and encrypted channel.
C. It is the secure shell; it is used to restrict actions available to users.
D. It is the standard shell: it has a restricted set of commands, but those are portable across different Linux distributions.
E. It is the synchronous shell: all commands are performed in a synchrous way.
A. It asks the password of the current user, and the prompts for a new password.
B. It launches the power management daemon.
C. It prints the path of the current working directory
D. It saves the current working directory, so that you can return there with the popd command.
A. move to root directory
B. move to home directory
C. nothing
D. one level up from the current directory
A. Richard Stallman
B. Brian Kernighan
C. Linus Torvalds
D. Dennis Ritchie
A. rm
B. cd
C. cp
D. ls
A. /boot
B. /bin
C. /dev
A. kernel modules
B. base kernel
C. all of these
A. create a named pipe (fifo) on a device
B. create a filesystem on a device (such as a hard disk partition)
C. create a fast changing section on a hard disk
D. format a floppy disk
A. set -o noclobber
B. noclobber
C. #NAME?
A. None of these
B. Your password
C. There is no such command
D. Current directory
A. deb_src
B. rpm
C. deb
D. ebuild
A. None of these
B. Slackware
C. Gentoo
D. Debian
E. Fedora
A. nslookup
B. dns
C. lsrouted
D. dnsquery
A. All of these
B. XFCe
C. Gnome
D. KDE
A. :q!
B. :w 'file name'
C. :q
D. :a
E. :wq
A. iptables
B. ipfw
C. ipchains
D. pf
A. The directory one level up from the current directory
B. Listing all LISTENING Connections
C. Change into the root directory
A. A computer software system and network protocol that provides a basis for graphical user interfaces (GUIs) and rich input device capability for networked computers.
B. A linux distribution
C. A desktop environment and graphical user interface that runs on top of a computer operating system.
A. The process is running at low priority.
B. The process is a zombie process.
C. The process is in sleep mode.
D. The process is running at top priority.
A. $HISTFILE
B. !6
C. !!
A. man whois
B. none of these
C. help whois
D. man help whois
A. Swap is the cache of your Physical Memory (RAM)
B. Swap is the ability to switch between users in one terminal session
C. Swap is the cache of your HDD
D. Swap space is the area on a hard disk which is part of the Virtual Memory of your machine (Swap+RAM)
A. host
B. name
C. hn
D. hostname
A. stands for "Light Loader"
B. is a type of Linux Distro
C. is a boot loader that can boot Linux
D. stands for "Lannister-In-Lannister-Out"
E. is only used by Slackware
A. cat /etc/docs/kill | less
B. kill --help
C. man kill
D. doc kill
E. kill -help
A. 2
B. $
C. *
D. &
E. ?
A. ls
B. sys
C. pkg
D. query-pkg
E. rpm -qa
A. type
B. cat
C. biff
D. ls
A. rm -d
B. rd
C. deltree
D. rmdir
E. rm -r
A. The DNS resolver configuration file
B. Configuration file with software sources
C. This file does not exist
D. Network interfaces configuration file
E. Configuration file with local user accounts and its identificators
A. ftp
B. sftp
C. tcp
D. ucp
A. lists the size of all files within your $HOME with sizes in human readable form
B. duplicates the current process
C. deletes your account and home directory
D. dumps your home directory to /tmp
E. searches you home directory for duplicate filenames
A. fastfind
B. locate
C. search
A. cpu
B. disk space
C. memory
A. Logical Volume Manager
B. Linux Volume Manager
C. Light Video Manager
D. Linux Video Manager
A. displays the default directory path
B. changes to /a/b directory
C. changes to the / directory
D. prompts you for the next directory choice
E. changes to your home directory
A. type the variable's name (in lower case only)
B. add the dollar ($) symbol after the variable name
C. add the hash (#) symbol after the variable name
D. add the underscore (_) symbol before the variable name
E. add the dollar ($) symbol before the variable name
A. A zombie process is a process whose status had been saved on the disk, and which is now waiting to be restored.
B. A zombie process is a process which has terminated, but whose parent had not yet read its exit status.
C. A zombie process is a process created by a worm to remain active even after it is killed.
A. Nothing; it doesn't exist.
B. It's the opposite of the "yes" command; it outputs an infinite series of 'n's (or a word of your choice).
C. It returns a non-zero exit code to indicate failure (it's a synonym to the "false" command).
A. used for LIsting the boot LOaders
B. a type of Linux
C. lists all the devices
D. lists all the lower memory areas
E. a boot loader
A. mount a filesystem as read-only
B. mount filesystem only after a read-write check is performed
C. mount removable (e.g., CD-ROM) filesystem
D. mount remote (network) filesystems
A. ren bkw=cat
B. You cannot do that.
C. alias bkw=cat
A. vi
B. emacs
C. expr
D. ex
A. cpusage
B. dmesg
C. sysinfo --cpu
D. cat /proc/cpuinfo
A. ENOTTY
B. EFAULTF
C. EINVAL
D. EBADF
E. 0
A. /etc/mtab
B. /etc/fstab
C. /etc/filesystems
D. /etc/fs.conf
A. Makes the file read by the owner, execute by group and other.
B. Makes the file execute by the owner, execute/read by group and other.
C. Makes the file read/write/execute by the owner, read/execute by group and other.
D. Makes the file write/read by the owner, execute by group and other.
E. Makes the file write/execute by the owner, execute by group and other.
A. You cannot get the file back.
B. Go to the trash bin and remove it.
C. Type the rm -u command.
A. sends ICMP packets to target device/server to verify if it's online.
B. makes an audiable ping each time a disk drive start spinning
C. verifies that the routing tables comply to the current network state
D. sends TCP packets to target device/server to verify if it's online.
A. 255 bytes.
B. It depends on the file system.
C. 256 bytes.
D. 1024 bytes.
E. 1023 bytes.
A. type values of environment variables
B. print a text file to the default printer
C. print a text file to the printer specified in $PRINTER
D. print a text file to the printer specified in /etc/env
A. show HHH uptime
B. show HHH load averages
C. all are correct
D. show HHH current time
A. %h
B. %f
C. %H
D. %F
A. startx
B. xterm
C. gdm-start
D. gdm
E. gnome-terminal
A. False
B. True
A. Never; it has to be manually cleaned.
B. Every week (run by /etc/cron.weekly).
C. Every month (run by /etc/cron.monthly).
D. Every time the system is booted.
A. List Open Files
B. Local Service of Files
C. Lag Spike of Death
D. Local System Officer
E. Large Scale Optimization File
A. move the contents of DDD to /tmp, and delete the DDD directory
B. delete both the contents of and the DDD directory
C. produce an error
D. delete only the contents of the DDD directory
A. modprobe uhci-hcd
B. modprobe ehci-ocd
C. modprobe usbcore
A. -H
B. -h
C. -f
D. -r
A. It's too hard to port filesystems to Linux
B. Sun's implementation uses a license incompatible with the GPL
C. Oracle is suing the Linux Foundation
D. There is a user space port using FUSE
A. No, you have to reboot for the new swap to be activated properly
B. Yes if you create a swap file
C. No, you have to boot with a Live CD to do that
D. No, you have to re-install your system to do that
A. fs
B. free
C. du
D. df
A. Output command2 wil be input of command1
B. Command2 run after Command1
C. Command1 and Command2 run together
D. Output command1 wil be input of command2
A. Only list of the listening ports
B. Showing statistics of only TCP protocol
C. Displays statistics by protocol. By default, statistics are shown for the TCP, UDP, ICMP, and IP protocols.
D. List of processes that use the connection at the moment
A. print system information
B. nothing
C. show the user name
D. change user name
A. The string after the $ is replaced by a directory name.
B. The string after the $ will take on the value of the environment variable with the same name.
C. all of these
A. attempts to load a kernel module along with all its depended modules
B. searches all filesystems for the specified module
C. types the header section of the specified module
D. searches memory to see if the specified module is loaded to memory
A. Using 2>&1
B. Using >/dev/error
C. Using >>stderr
A. All of these
B. less
C. more
D. cat
A. top --USERNAME
B. cat /etc/activeprocess | grep USERNAME
C. top -U [USERNAME]
D. cat /home/USERNAME/open.process
E. netstat -u USERNAME
A. will move the file in a fast mode, namely will not make any checks (like if there's enough space for the file)
B. will move the file or directory to a FIFO device
C. even if the target file exists, the operation will be carried out (and no warning messages on restricted access modes will be printed)
D. move the file to the filesystem indicated after the '-f' switch
A. route -w
B. cat /etc/routetab
C. route or netstat -r
D. routing
A. GNU Released Unix Booter
B. Great Unix Boot Loader
C. Gentoo's Regular Booter
D. Grand Unified Boot Loader
A. Process's scheduling priority
B. Number of memory pages (swap) of the process
C. Process ID
D. Parent process ID
A. create a help file for kernel module ofile
B. set information about kernel module ofile
C. print information about kernel module ofile
D. set default handling options for kernel module ofile
A. Run Level 3
B. Run Level 1
C. Run Level 5
D. Run Level 4
E. Run Level 2
A. write
B. create
C. execute
D. read
A. gnome-terminal
B. konsole
C. gdm
D. xterm