100 TOP Real Time Linux Multiple choice Questions and Answers pdf downloa

Read the most frequently asked 100 top Linux multiple choice questions and answers PDF for freshers and experienced

Linux Objective type Questions and Answers List


Linux MCQs
Linux Objective type Questions

What is the linux mascot?
A. Hat
B. Gecko
C. Elephant
D. Penguin
Ans: D

How do you show all processes being run by a particular user?
A. cat /home/USERNAME/open.process
B. top –USERNAME
C. cat /etc/activeprocess | grep USERNAME
D. netstat -u USERNAME
E. top -U [USERNAME]
Ans: E

What does GRUB stand for?
A. Grand Unified Bootloader
B. Grand Unification Bootloader
C. Great Unique Bootloader
D. Gum Removal Under Boot
E. Great Ultimate Bootloader
Ans: A

GRUB stands for _____.
A. Grand Unified Boot Loader
B. Gentoo’s Regular Booter
C. Great Unix Boot Loader
D. GNU Released Unix Booter
Ans: A

mount -a’ will load all filesystems listed in:
A. /etc/mtab
B. /etc/filesystems
C. /etc/fstab
D. /etc/fs.conf
Ans: C

What is GNOME ?
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 desktop environment and graphical user interface that runs on top of a computer operating system.
C. A linux distribution
Ans: B

Ubuntu is based on…
A. Fedora
B. Slackware
C. Debian
D. None of these
E. Gentoo
Ans: C

How do you activate the noclobber shell option?
A. noclobber
B. set -o noclobber
C. #NAME?
Ans: B

The Linux Kernel was written by?
A. Brian Kernighan
B. Dennis Ritchie
C. Richard Stallman
D. Linus Torvalds
Ans: D

What will show you all the subdirectories of the current directory?
A. rm
B. ls
C. cd
D. cp
Ans: B

Which directory contains all the files needed to boot the Linux system?
A. /dev
B. /boot
C. /bin
Ans: B

‘mkfs’ is used to:
A. create a filesystem on a device (such as a hard disk partition)
B. format a floppy disk
C. create a fast changing section on a hard disk
D. create a named pipe (fifo) on a device
Ans: A

The ”rm” command is used to:
A. remove a kernel module owned by you
B. run an M4 macro
C. mount a remote file system
D. delete a file
Ans: D

What makes up a Linux kernel?
A. base kernel
B. kernel modules
C. all of these
Ans: C

What is the ssh command?
A. It is the standard shell: it has a restricted set of commands, but those are portable across different Linux distributions.
B. It is the synchronous shell: all commands are performed in real-time.
C. It is the secure shell; it is used to restrict actions available to users.
D. It is the secure shell; it is used to connect to remote hosts via an authenticated and encrypted channel.
E. It is the synchronous shell: all commands are performed in a synchrous way.
Ans: D

What does the pwd command do?
A. It saves the current working directory, so that you can return there with the popd command.
B. It asks the password of the current user, and the prompts for a new password.
C. It prints the path of the current working directory
D. It launches the power management daemon.
Ans: C

SSH stands for _____.
A. Security Shell
B. Synchronous Shell
C. System Shell
D. Secure Shell
E. Super Shell
Ans: D

mknod can create special file (used for sending or receiving data) of type:
A. character file
B. fifo (pipe) file
C. all are correct
D. block file
Ans: C

If you wanted to execute a shell command in the background, which character would you put at the end of the command line?
A. &
B. ;
C. :
Ans: A

The loaded modules in the kernel are listed in /proc/modules. You can get this list using the command:
A. lsmod
B. lsattr
C. listmodules
D. modules
Ans: A

Executing “pwd” in shell will return:
A. None of these
B. There is no such command
C. Your password
D. Current directory
Ans: D

_____ is a Linux “desktop environment”.
A. XFCe
B. Gnome
C. KDE
D. All of these
Ans: D

What does it means when the ps commands shows a ‘Z’ in the status column for a process?
A. The process is in sleep mode.
B. The process is running at top priority.
C. The process is a zombie process.
D. The process is running at low priority.
Ans: C

The netstat command give information on:
A. all are correct
B. active sockets
C. open sockets
D. routing tables
Ans: A

To repeat the last command in the bash shell history, type…
A. !!
B. $HISTFILE
C. !6
Ans: A

How do you view the documentation for the command ‘kill’ in the Linux terminal?
A. kill -help
B. kill –help
C. doc kill
D. cat /etc/docs/kill | less
E. man kill
Ans: E

What is swap?
A. Swap space is the area on a hard disk which is part of the Virtual Memory of your machine (Swap+RAM)
B. Swap is the cache of your HDD
C. Swap is the cache of your Physical Memory (RAM)
D. Swap is the ability to switch between users in one terminal session
Ans: A

Which answer assists you in finding help on the whois command?
A. help whois
B. man whois
C. none of these
D. man help whois
Ans: B

To start another shell under the current shell you use the command:
A. bash
B. All of these
C. sh
D. csh
Ans: B

To query DNS (Internet domain name) servers, you use the command:
A. dns
B. lsrouted
C. dnsquery
D. nslookup
Ans: D

Add this symbol to a command to run it in the background
A. &
B. *
C. 2
D. $
E. ?
Ans: A

What is the right command to save file and exit in Vim?
A. :wq
B. :a
C. :q
D. :q!
E. :w ‘file name’
Ans: A

Fedora Linux uses _____ packages.
A. deb
B. ebuild
C. deb_src
D. rpm
Ans: D

With which userspace is Linux typically paired?
A. Hurd
B. System V
C. GNU
D. BSD
E. Minix
Ans: C

As a privileged user, you may set the hostname with the command:
A. hostname
B. name
C. hn
D. host
Ans: A

What command can be used to delete a directory, recursively searching for files and other directories and deleting them?
A. rd
B. rmdir
C. rm -d
D. deltree
E. rm -r
Ans: E

On Red Hat Linux and its derivatives, which of the following commands will be appropriate to check whether a particular “package” is installed or not?
A. query-pkg
B. rpm -qa
C. pkg
D. sys
E. ls
Ans: B

To transfer files in an insecure way to and from a remote network site host, you use the command:
A. ftp
B. tcp
C. ucp
D. sftp
Ans: A

Which firewall is most commonly used on Linux?
A. ipchains
B. ipfw
C. pf
D. iptables
Ans: D

/etc/resolv.conf is …
A. Configuration file with local user accounts and its identificators
B. Network interfaces configuration file
C. The DNS resolver configuration file
D. Configuration file with software sources
E. This file does not exist
Ans: C

LILO…
A. is a boot loader that can boot Linux
B. stands for “Lannister-In-Lannister-Out”
C. is only used by Slackware
D. stands for “Light Loader”
E. is a type of Linux Distro
Ans: A

LVM is…
A. Logical Volume Manager
B. Linux Video Manager
C. Linux Volume Manager
D. Light Video Manager
Ans: A

uname -a will output…
A. kernel info
B. architecture
C. date where the kernel was built
D. cpu info
E. All of the answers are correct.
Ans: E

Consider using the command “cd /a/b/c”, then executing “cd ..”. What does this last command do?
A. changes to your home directory
B. displays the default directory path
C. prompts you for the next directory choice
D. changes to the / directory
E. changes to /a/b directory
Ans: E

Which tool is similar to find except that it uses an index to search?
A. locate
B. fastfind
C. search
Ans: A

To read one or more files and type them on standard output, you use:
A. ls
B. cat
C. type
D. biff
Ans: B

the ‘-r’ switch to the mount command will:
A. mount remote (network) filesystems
B. mount filesystem only after a read-write check is performed
C. mount removable (e.g., CD-ROM) filesystem
D. mount a filesystem as read-only
Ans: D

Which return value from an ioctl request indicates success?
A. ENOTTY
B. 0
C. EINVAL
D. EBADF
E. EFAULTF
Ans: B

The command “free” reports on:
A. memory
B. cpu
C. disk space
Ans: A

The jobs command
A. puts all foreground jobs in the background
B. lists background jobs
C. prints a dedication to Steve Jobs
D. provides basic accounting information for all current jobs
E. halts all foreground jobs
Ans: B

What does the Linux “no” command do?
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).
Ans: A

The command du -h ~
A. duplicates the current process
B. searches you home directory for duplicate filenames
C. deletes your account and home directory
D. lists the size of all files within your $HOME with sizes in human readable form
E. dumps your home directory to /tmp
Ans: D

Why hasn’t ZFS been added to the Linux kernel?
A. It’s too hard to port filesystems to Linux
B. Oracle is suing the Linux Foundation
C. Sun’s implementation uses a license incompatible with the GPL
D. There is a user space port using FUSE
Ans: C

What does “chmod 755 file” accomplish?
A. Makes the file read/write/execute by the owner, read/execute by group and other.
B. Makes the file execute by the owner, execute/read by group and other.
C. Makes the file write/execute by the owner, execute by group and other.
D. Makes the file read by the owner, execute by group and other.
E. Makes the file write/read by the owner, execute by group and other.
Ans: A

LILO is _____.
A. used for LIsting the boot LOaders
B. a boot loader
C. lists all the devices
D. lists all the lower memory areas
E. a type of Linux
Ans: B

What is a zombie process?
A. A zombie process is a process created by a worm to remain active even after it is killed.
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 whose status had been saved on the disk, and which is now waiting to be restored.
Ans: B

Which is an example of a shell comment?
A. mkdir text # make a directory
B. mkdir text //make a directory
C. //mkdir text
Ans: A

If a host is called HHH, ‘rstat HHH’ will:
A. show HHH uptime
B. show HHH load averages
C. all are correct
D. show HHH current time
Ans: C

Which of the following is not an editor?
A. expr
B. vi
C. emacs
D. ex
Ans: A

To use chown recursively, instead of using _recursive you can use:
A. #NAME?
B. -r
C. -c
D. -R
Ans: D

How would you create an alias for the cat command?
A. alias bkw=cat
B. You cannot do that.
C. ren bkw=cat
Ans: A

To access the value of an environment variable, we _____.
A. add the dollar ($) symbol before the variable name
B. type the variable’s name (in lower case only)
C. add the hash (#) symbol after the variable name
D. add the dollar ($) symbol after the variable name
E. add the underscore (_) symbol before the variable name
Ans: A

How to reveal detailed information about CPU?
A. sysinfo –cpu
B. cpusage
C. dmesg
D. cat /proc/cpuinfo
Ans: D

_____ command starts the default desktop environment.
A. gdm
B. xterm
C. startx
D. gdm-start
E. gnome-terminal
Ans: C

You want to load the main kernel module for USB support. Which command would help you achieve this task?
A. modprobe usbcore
B. modprobe ehci-ocd
C. modprobe uhci-hcd
Ans: A

If DDD is a non empty directory, and you execute ‘rmdir DDD’, it will:
A. move the contents of DDD to /tmp, and delete the DDD directory
B. delete only the contents of the DDD directory
C. produce an error
D. delete both the contents of and the DDD directory
Ans: C

lsof command means:
A. Large Scale Optimization File
B. List Open Files
C. Local System Officer
D. Local Service of Files
E. Lag Spike of Death
Ans: B

Which of the following accurately describes a “ping?”
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.
Ans: A

What is the maximum length of a file name on Linux?
A. 255 bytes.
B. 1023 bytes.
C. It depends on the file system.
D. 1024 bytes.
E. 256 bytes.
Ans: C

The run level in a system can be configured in the file _____.
A. /bin/runlev
B. /sys/rinit
C. /bin/rlev
D. /etc/inittab
E. /etc/syslev
Ans: D

When does /tmp normally get cleaned out?
A. Never; it has to be manually cleaned.
B. Every time the system is booted.
C. Every week (run by /etc/cron.weekly).
D. Every month (run by /etc/cron.monthly).
Ans: B

To report the amount of free disk space available on all mounted file systems you use the command:
A. free
B. fs
C. du
D. df
Ans: D

In a date +format, you add the hour in 24 hours format using:
A. %f
B. %H
C. %F
D. %h
Ans: B

What does the “uname” command do?
A. nothing
B. print system information
C. show the user name
D. change user name
Ans: B

If you use the rm command to accidentally delete a file, how can you get the file back?
A. You cannot get the file back.
B. Go to the trash bin and remove it.
C. Type the rm -u command.
Ans: A

The behavior of the system for each “runlevel” is available in the _____ file.
A. /etc/mtab
B. /etc/inittab
C. /etc/hosts
D. /etc/rlevel
E. /etc/crontab
Ans: B

command1 | command2 will?
A. Command1 and Command2 run together
B. Output command2 wil be input of command1
C. Output command1 wil be input of command2
D. Command2 run after Command1
Ans: C

printenv will:
A. print a text file to the printer specified in /etc/env
B. print a text file to the printer specified in $PRINTER
C. type values of environment variables
D. print a text file to the default printer
Ans: C

Is it possible to increase SWAP space without rebooting?
A. No, you have to boot with a Live CD to do that
B. No, you have to reboot for the new swap to be activated properly
C. No, you have to re-install your system to do that
D. Yes if you create a swap file
Ans: D

To print the first 10 lines of one or more files to the standard output, you use the command:
A. topf
B. head
C. ftop
D. start
Ans: B

What flag makes “ls -l” print file sizes in human readable format (e.g. 1K, 231M, 2G, etc)?
A. -f
B. -r
C. -H
D. -h
Ans: D

True or false: The Linux OS is not affected by malware.
A. True
B. False
Ans: B

Which Run Level provides “Full multiuser mode with network and X display manager”?
A. Run Level 4
B. Run Level 5
C. Run Level 1
D. Run Level 3
E. Run Level 2
Ans: B

To create one or more directories with the mkdir command, which permissions in the directory’s parent directory do you need?
A. create
B. write
C. execute
D. read
Ans: B

To display contents of files on standard output, you could use the command:
A. All of these
B. cat
C. more
D. less
Ans: A

The at command allows you to execute a command at:
A. a certain machine
B. a certain holiday
C. a certain date
D. a certain network
Ans: C

In a ps command output, the PPID displays the:
A. Number of memory pages (swap) of the process
B. Process’s scheduling priority
C. Process ID
D. Parent process ID
Ans: D

‘mv -f’ will:
A. even if the target file exists, the operation will be carried out (and no warning messages on restricted access modes will be printed)
B. move the file to the filesystem indicated after the ‘-f’ switch
C. will move the file in a fast mode, namely will not make any checks (like if there’s enough space for the file)
D. will move the file or directory to a FIFO device
Ans: A

_____ is not a ‘Terminal Emulator’.
A. konsole
B. xterm
C. gnome-terminal
D. gdm
Ans: D

How do you redirect stderr to stdout?
A. Using >>stderr
B. Using 2>&1
C. Using >/dev/error
Ans: B

What, according to bc, is 2^2?
A. 4.00000001
B. 4
C. 2
D. A syntax error.
Ans: B

Typing the “cd” command at the shell prompt will take you to the _____.
A. /root
B. parent
C. current
D. $HOME
E. /boot
Ans: D

modinfo [options] ofile’ will:
A. create a help file for kernel module ofile
B. print information about kernel module ofile
C. set information about kernel module ofile
D. set default handling options for kernel module ofile
Ans: B

modprobe…
A. types the header section of the specified module
B. searches all filesystems for the specified module
C. searches memory to see if the specified module is loaded to memory
D. attempts to load a kernel module along with all its depended modules
Ans: D

Which of the following file ‘probably’ contains the ‘user specific’ settings for the “windows manager”?
A. /X11/xinit/xinitrc
B. $HOME/.xinitrc
C. /xinit/xinitrc
D. /.xinitrc
E. /etc/X11/xinit/xinitrc
Ans: B

To search one or more files for matching lines, which command may be used?
A. grep
B. egrep
C. fgrep
D. All of these
Ans: D

What does the $ represent within the context of a shell command?
A. The string after the $ is replaced by a directory name.
B. all of these
C. The string after the $ will take on the value of the environment variable with the same name.
Ans: C

Write a command to list all files with 5 characters in the name.
A. ls !!!!!
B. ls ?????
C. ls *****
Ans: B

The mkraid command will:
A. separate the disk devices into two groups and will create RAID 1/0 on them
B. initialize a new RAID array, destroying any existing data on the disks used
C. move any data on the disk devices used to create the array into the new RAID
D. create a new RAID 5 on the disk devices
Ans: B

Single User Mode equivalent to _____.
A. run level 4
B. run level 1
C. run level 3
D. run level 2
E. run level 0
Ans: B

What binary format do Linux Executables use?
A. PE
B. ELF
C. Mach-O
D. a.out
E. COFF
Ans: B

To see the kernel routing tables, you do:
A. route or netstat -r
B. routing
C. route -w
D. cat /etc/routetab
Ans: A

What is “vmlinuz”?
A. It is a “virtual machine” used in Linux.
B. It is a “type of Linux Shell”.
C. This command executes Linux in “virtual mode”.
D. It is a “compressed Linux kernel”.
E. It is a “type of Linux operating system”.
Ans: D

What is the uid of root?
A. -1
B. 0
C. superuser
D. 1000
E. 1
Ans: B

pwconv will…
A. convert /etc/passwd file so non previleged users could edit it
B. revert the system to use unshadowed passwords
C. convert entries in /etc/passwd (un-shadowed) into shadowed entries in /etc/shadow
D. convert /etc/passwd entries from Unix to Linux format
Ans: C

SSH uses _____ to authenticate remote computers.
A. public key cryptography
B. secret key cryptography
C. both block and stream ciphers
D. stream cipher
E. block cipher
Ans: A

By default what file contains encrypted user passwords?
A. /etc/password
B. /etc/master.passwd
C. /etc/passwd
D. /etc/shadow
E. /etc/passwdinfo
Ans: D

‘mkdir -m 444 any’ will:
A. Create a read-write-execute directory named any
B. create a read-only directory named any
C. Create a write-only directory named any
D. Create a read-write directory named any
Ans: B

What program is launched by the kernel at system start up first?
A. /sbin/start
B. /boot
C. /sbin/initial
D. /sbin/init
E. /etc/rc.d/rc.sysinit
Ans: D

How do you make a list of all filenames in the /tmp directory that the contain the text “user”, regardless of case?
A. ls /tmp : grep user
B. ls /tmp | grep user
C. ls /tmp | grep -i user
D. grep user /tmp
E. ls /tmp | find user
Ans: C

rev will:
A. reverse the order of characters read from standard input and type the result stream of characters to standard output
B. reverse the spin of a local disk drive
C. review the networking status and alert on problems
D. type the system revision number to standard output
Ans: A

Can I have swap partition and swap file activated at the same time?
A. Yes
B. No
C. Only if you set ‘vm.swappiness=100’
D. Only if you set priority of swap containers
Ans: A

To write a message to all users (on their terminals) over a network, you use:
A. rwrite
B. write
C. rwall
D. wall
Ans: D

What will you get if you try to read from the pseudo-device /dev/null?
A. An infinite string of zeroes (‘0’, ASCII 0x30).
B. An error (/dev/null can only be written to, not read from).
C. An infinite string of nulls (‘\0’, ASCII 0x00).
D. Nothing.
Ans: D

How to display current iptables rules?
A. ipfw
B. iptables -L
C. iptables -l
D. route -n
E. iptables –show
Ans: B

How do you find all files in /etc which end in .conf?
A. find /etc *.conf
B. find /etc -name “*.conf”
C. all of these
Ans: B

Executing the command “init 6” will _____.
A. set the run level to 0
B. kill the “init” process
C. change the user interface to CUI
D. reboot the system
E. halt the system
Ans: D

What does it mean when a variable is unbound?
A. It is not defined.
B. It exists but is not a displayable type.
Ans: A

For what purposes can socat be used?
A. Bridging a TCP and UDP service
B. Concatenating arbitrary pcap files to the network
C. SOCKS Proxy
D. IPv6 to IPv4 bridging
E. All of these
Ans: E

What source control system does the Linux kernel use?
A. patches
B. bitkeeper
C. git
D. svn
E. cvs
Ans: C

Information about modules, like module dependency, and where certain types of modules reside in the filesystem, is found in:
A. /etc/infomod.conf
B. /etc/lsmod.conf
C. /etc/modinfo.conf
D. /etc/modules.conf
Ans: D

The user smith issued the egrep “^[[:upper:]]” words.txt command. What does this command do?
A. displays all lines in the words.txt file after translating lowercase letters to uppercase
B. displays all lines in the words.txt file that begin with an uppercase letter
C. displays all lines in the words.txt file that contain an uppercase letter
D. displays all lines in the words.txt file after translating uppercase letters to lowercase
Ans: B

What is not part of the Linux Kernel?
A. Word Processor
B. The bash shell
C. C Compiler
D. All of these
Ans: D

To send a file to the printer spool queue, you use the command:
A. pr
B. spool
C. lpr
D. print
Ans: C

Which of the following commands can be used to change the run level?
A. runlevel -c
B. inittab
C. rlev -l
D. mod-runlevel
E. init
Ans: E

“Run Level Zero (0)” stands for _____.
A. Single User Mode
B. Multi User Mode
C. Halt
D. Reboot
E. Not Used/User Definable Mode
Ans: C

options (switches) to the ps command may start with:
A. –
B. —
C. all are correct
D. nothing
Ans: C

Which of the following files ‘probably’ contains the default “windows manager settings”?
A. $HOME/.xinitrc
B. /xinit/xinitrc
C. .xinitrc
D. /X11/xinit/xinitrc
E. /etc/X11/xinit/xinitrc
Ans: E

If the system is not in runlevel 0 or 6, before performing a power-off operation, the poweroff command will execute:
A. shutdown -S
B. shutdown -s
C. shutdown -r
D. shutdown -h
Ans: D

Reset will…
A. reboot a system
B. clear your session’s screen (terminal)
C. restart a program
D. disconnect all processes from a disk drive
Ans: B

To format a device as a Linux second extended filesystem (ext2), you use the command:
A. Both mke2fs and mkfs.ext2
B. mke2fs
C. mkfs.ext2
Ans: A

What will “cat /proc/mdstat” tell you?
A. The state of your RAID file system (if any).
B. The list of MSDOS file systems that you have mounted (if any).
C. The MD5 hash of the running kernel for security/integrity purposes.
D. The magnetic tape drive’s status (if any).
E. “cat: /proc/mdstat: No such file or directory” 😛
Ans: A

What does the following line mean when it is run in a script ‘#!/bin/bash’?
A. It makes sure that the script runs in the bash shell.
B. It checks to see if the bash shell exists on the machine.
C. all of these
Ans: A

Given that the ip command is installed, what is the effect of the command ip a ls
A. It lists the neighbours of the system on an IP network.
B. Command “ls” is unknown, try “ip addr help”.
C. It lists the defined interfaces and the addresses associated with those interfaces.
Ans: C

The backslash on the command line indicates
A. the root directory
B. a command pipe
C. a one-character escape
D. the end of a file
E. a regular expression search
Ans: C

What does permission 641 (octal) mean?
A. Owner can read and write; group can write; other can read
B. Owner can read and write; group can write and execute; other can read
C. Owner can read, write and execute; group can read and write; other can read
D. Owner can read and write; group can read; other can execute
E. Owner can read and execute; group can read and write; other can execute
Ans: D

The acronym WINE stands for:
A. Wine is not an Emulator
B. Windows Emulator
C. Windows Environment
D. Wine is Not for Eunichs
Ans: A

In a BASH script this command line parameter contains the scripts own name:
A. $NAME
B. $$
C. $?
D. $0
E. $1
Ans: D

In bash you can use these quote marks for command substitution.
A. backquotes ` `
B. forward slashes / /
C. single quotes ‘ ‘
D. double quotes ” ”
E. backslashes \ \
Ans: A

What happens if you try to write to /dev/null and /dev/zero?
A. You cannot write to /dev/null, only to /dev/zero.
B. Nothing.
C. You cannot write to /dev/zero, only to /dev/null.
D. You cannot write to either of them, only read from them.
Ans: B

Which of the following is a way to update mlocate’s index?
A. updatedb
B. dbupdate
C. find -mlocate
D. mlocate -u
E. dbmlocate
Ans: A

In the command ‘mv source target’, if source is a directory and target is an existing directory, the result will be to:
A. overwrite ‘target’ directory with ‘source’ directory
B. move ‘source’ directory to be a subdirectory of ‘target’ directory
C. move ‘source’ directory to be on same level in the directory tree as ‘target’ directory
D. merge ‘target’ directory with ‘source’ directory
Ans: B

Running “man –locale=LLL” instructs man to override the value of which of these functions?
A. local(LLL)
B. whereami()
C. setlocale()
D. local()
Ans: C

Which of the following commands will correctly display the version of the Linux kernel running?
A. All three commands work
B. uname -r
C. uname -o
D. None of these commands work
E. sysinfo
Ans: B

mktemp -d’ will:
A. will create a dump filesystem
B. will create a swap filesystem
C. will create a temporary filesystem
D. create a unique temporary directory (e.g., for script’s commands usage)
Ans: D

newaliases will:
A. rebuild the mail aliases database that reside in /etc/aliases
B. types all the aliases the news reader uses
C. updates the news reader’s aliases from the file /etc/aliases
Ans: A

‘mv -u’ will:
A. not remove a file or link if its modification date is the same as or newer than that of its replacement
B. will create a backup of the target so an ‘undo’ is possible
C. undo the last mv command performed on the same filesystem
D. will translate DOS formatted files to Unix format (e.g., will change end-of-line characters)
Ans: A

How find the current system runlevel?
A. sys level show
B. init
C. init -q
D. runlevel -h
E. runlevel
Ans: E

To format a device as an ext3 (journaled) Linux extended filesystem, you use the commands:
A. mkfs.ext3
B. all are correct
C. mkfs.ext2 -j
Ans: B

To do unlimited precision arithmetic calculations from the shell, you use:
A. All of these
B. bc
C. cal
D. calc
Ans: B

You need which of the following access modes in order to cd to a system directory?
A. t
B. w
C. r
D. x
E. s
Ans: D

What does the Linux “yes” command do?
A. Nothing; it doesn’t exist.
B. It outputs an infinite series of ‘y’s (or the word of your choice).
C. It returns the exit code 0 to indicate success (it’s a synonym to the “true” command).
Ans: B

The ________ command can be used to “kill” the ‘X server’.
A. Ctrl + D
B. Ctrl + Shift + Bksp
C. Ctrl + X
D. Ctrl + Alt + Del
E. Ctrl + Alt + Bksp
Ans: E

nfsstat will…
A. create or update remote NFS users from entries in the file /etc/nfsstat
B. activate kernel threads for the NFS (Network File System) kernel module
C. display an NFS user status on both server and client side systems
D. type statistics on NFS and remote procedure call (RPC) activity for both client and server systems
Ans: D

What is the purpose of the “tset” command?
A. To set a temporary variable.
B. To catch misspellings of the “test” command (they’re the same).
C. None; there is no such command in standard Linux.
D. To control thread execution.
E. To identify and initialize a terminal.
Ans: E

What is the expected output of the following command: unset x; test -z $x && echo 1
A. It depends: an error, if x is not set; nothing otherwise
B. Nothing.
C. 0
D. It depends: an error, if x is not set; 1 otherwise
E. 1
Ans: E

As a non-privileged user, if you use ‘nice’, it will:
A. will lower already running background processes priority
B. reshuffle directory entries, so ls will produce a pretty display
C. execute a command with a set priority (may be higher)
D. execute a command with lower priority
Ans: D

If no filesystems are specified on the command line, and the _____ option is not specified, then the command “fsck” will default to checking filesystems in “/etc/fstab” serial order.
A. -B
B. -A
C. -D
D. -E
E. -C
Ans: B

Which of the following commands shows routing table information?
A. routeshow
B. route –list
C. ip route show
D. ip route get
E. net stat
Ans: C

Man pages are written using what markup language?
A. HTML
B. TROFF
C. PERLDOC
D. UTF-8
E. RTF
Ans: B

How are typical native code debuggers implemented?
A. By loading traced program’s code into the heap segment of the debugger which then acts as a virtual machine.
B. By a special system call that allows one process to control and trace execution of another.
C. By requesting the kernel scheduler to suspend the traced process and then analyzing its memory segments.
D. Using virtualization technology.
Ans: B

/bin/true is a command whose exit status is always:
A. 0
B. True
C. False
D. 1
Ans: A

What is cgroups ?
A. Feature to control user permissions
B. Linux kernel feature to control resource usage
C. Command to create new group of users
D. Special group of users, that can use sudo
E. This technology is not implemented in linux
Ans: B

What is the file /etc/nsswitch.conf?
A. tool to configure Ethernet switch
B. a PAM (Pluggable authentication modules) configuration file
C. facility that provides a variety of sources for common configuration databases and name resolution mechanisms
D. Windows manager configuration file
E. name server information
Ans: C

Which command is used for initializing physical volume(hard disk, or partition) for LVM usage?
A. pvmake
B. pvinit
C. lvm -p create
D. pvcreate
E. pvck
Ans: D

To create hard-links instead of copies with the cp command, you use:
A. All of these
B. -l
C. –perm-link
D. –cp
Ans: B

In POSIX-compatible shell, what will you see if you enter “echo foo*” when there are no files beginning with “foo” in the current directory?
A. foo
B. foo*
C. foo*: No such file or directory.
D. echo: No such file or directory.
E. Nothing.
Ans: B

Which one of these lines will check if the directory “foo” exists and create it if it doesn’t?
A. mkdir -p foo
B. test -d foo || mkdir foo
C. if [ ! -d foo ]; then mkdir foo; fi
D. All but one of them.
E. All of them.
Ans: E

What is the maximum size of an ext3 file system?
A. 1 PiB (1,125,899,906,842,624 bytes).
B. 256 TiB (281,474,976,710,656 bytes).
C. 32 TiB (35,184,372,088,832 bytes).
D. There is no theoretical limit.
E. 1 EiB (1,152,921,504,606,846,976 bytes).
Ans: C

Which command will tell you how long a system has been up and running since it was last booted?
A. w
B. who -b
C. cat /proc/uptime
D. All answers are correct.
E. uptime
Ans: D

The cksum command will read from standard input if:
A. All of these
B. ‘.’ is used
C. =’ is used
D. ‘-‘ is used
Ans: D

In a file delimited by commas, what command will print the 3rd column of data:
A. awk -f, ‘{print $3}’
B. awk ‘{print $3}’
C. awk -F, ‘{print $3}’
Ans: C

What does the command “set $(date)” do?
A. It changes the order of the date fields
B. It sets the system date
C. It parses the system date into command line parameters $1 – $6
D. It displays the current system’s setup date
E. It displays the system date
Ans: C

in terms of system calls, when bash process executes cat or
C.
D. \0
E.
Ans: E

What is the result of echo ‘$MyVar’ ?
A. MyVar
B. the value of $MyVar
C. $MyVar
Ans: C

modprobe -d:
A. deactivate a module in memory.
B. specifies the directory where modules can be found.
C. deletes a module from the filesystem.
D. deletes a module from memory.
E. types debugging information regarding a module.
Ans: B

A user has a file called OriginalFile, and then creates a hard link to it by executing the following command (brackets not part of command): [ cp -l OriginalFile CopyOfFile ] Which of the following are true?
A. Deleting CopyOfFile will delete OriginalFile
B. Moving OriginalFile to a new directory will cause CopyOfFile to become a broken link
C. All of these are true
D. None of these are true
E. Editing CopyOfFile will affect OriginalFile
Ans: E

Apart from SIGKILL, which other signal cannot be caught nor ignored?
A. SIGTRAP
B. SIGXCPU
C. SIGSYS
D. SIGPWR
E. SIGSTOP
Ans: E

What file will show you how the kernel was started?
A. /proc/bootargs
B. /boot/grub/menu.lst
C. /boot/grub/grub.conf
D. /proc/cmdline
Ans: D

Can `ip` in iproute2 take multiple commands in a row?
A. Yes, using `ip -sequence`
B. Yes, using `ip –file`
C. No
D. Yes, using `ip -batch`
E. Yes, using `ip -f`
Ans: D

The last privileged port (any port that can’t be opened by anyone else but the root user) is:
A. 1023
B. 1025
C. 999
D. 1024
Ans: A

Will tar extract information about file permissions?
A. Yes, if “-p” specified or is root.
B. No.
C. Yes, only if “-p” specified.
D. Yes, only if it’s root.
E. Yes, only on NTFS volumns.
Ans: A

In chgrp command, the letter you use to add a sticky bit (e.g., to prevent removal of files by non-owner from a directory) is:
A. l
B. s
C. y
D. t
Ans: D

newgrp will:
A. create a new group on the system
B. create a new group and potentially add users to it
C. change user’s group ID (GID)
D. change group’s parameters
Ans: C

To block/allow regular users to send write messages to your session, you use:
A. write -q
B. block [-y|-n]
C. term -q
D. mesg
Ans: D

In BASH scripts the symbols “<<" indicate... A. rapid query B. much less than C. left shift D. input redirection E. a "here" document Ans: E What will you get if you try to read from the pseudo-device /dev/zero? A. An infinite string of zeroes ('0', ASCII 0x30). B. An infinite string of nulls ('\0', ASCII 0x00). C. Nothing. D. An error (/dev/zero cannot be read from, only written to). Ans: B Which file would be returned by ls File[A5] ? A. FileAB B. FileA5 C. none of these D. FileA Ans: D Can you make hard links to directories just as you can to ordinary files? A. Yes, but only in single user mode. B. Sometimes, depending on file system restrictions. C. Yes, there's no difference between hard linking files / directories. D. No, that would corrupt the requirement that every file only has one parent directory. Ans: B

Leave a Reply

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