Linux Test

1. What is the linux mascot?
Answers:
• Elephant
• Hat
• Gecko
• Penguin
2. True or false: The Linux OS is not affected by malware.
Answers:
• True
• False
3. The user smith issued the egrep "^[[:upper:]]" words.txt command. What does this command do?
Answers:
• displays all lines in the words.txt file that contain an uppercase letter
• displays all lines in the words.txt file after translating lowercase letters to uppercase
• displays all lines in the words.txt file after translating uppercase letters to lowercase
• displays all lines in the words.txt file that begin with an uppercase letter
4. pwconv will...
Answers:
• convert entries in /etc/passwd (un-shadowed) into shadowed entries in /etc/shadow
• revert the system to use unshadowed passwords
• convert /etc/passwd entries from Unix to Linux format
• convert /etc/passwd file so non previleged users could edit it
5. How do you find all files in /etc which end in .conf?
Answers:
• all of these
• find /etc *.conf
• find /etc -name "*.conf"
6. options (switches) to the ps command may start with:
Answers:
• all are correct
• -
• nothing
• --
7. In a BASH script this command line parameter contains the scripts own name:
Answers:
• $?
• $$
• $1
• $NAME
• $0
8. To write a message to all users (on their terminals) over a network, you use:
Answers:
• wall
• write
• rwrite
• rwall
9. What is "vmlinuz"?
Answers:
• This command executes Linux in "virtual mode".
• It is a "type of Linux operating system".
• It is a "virtual machine" used in Linux.
• It is a "compressed Linux kernel".
• It is a "type of Linux Shell".
10. What binary format do Linux Executables use?
Answers:
• a.out
• ELF
• Mach-O
• COFF
• PE
11. SSH uses _____ to authenticate remote computers.
Answers:
• secret key cryptography
• public key cryptography
• both block and stream ciphers
• stream cipher
• block cipher
12. How do you redirect stderr to stdout?
Answers:
• Using 2>&1
• Using >>stderr
• Using >/dev/error
13. Is it possible to increase SWAP space without rebooting?
Answers:
• No, you have to reboot for the new swap to be activated properly
• No, you have to re-install your system to do that
• Yes if you create a swap file
• No, you have to boot with a Live CD to do that
14. What does the "uname" command do?
Answers:
• change user name
• print system information
• nothing
• show the user name
15. 'mv -f' will:
Answers:
• will move the file in a fast mode, namely will not make any checks (like if there's enough space for the file)
• will move the file or directory to a FIFO device
• even if the target file exists, the operation will be carried out (and no warning messages on restricted access modes will be printed)
• move the file to the filesystem indicated after the '-f' switch
16. To use chown recursively, instead of using _recursive you can use:
Answers:
• -R
• -r
• #NAME?
• -c
17. To create one or more directories with the mkdir command, which permissions in the directory's parent directory do you need?
Answers:
• execute
• create
• read
• write
18. How would you create an alias for the cat command?
Answers:
• You cannot do that.
• ren bkw=cat
• alias bkw=cat
19. If you use the rm command to accidentally delete a file, how can you get the file back?
Answers:
• You cannot get the file back.
• Go to the trash bin and remove it.
• Type the rm -u command.
20. In a date +format, you add the hour in 24 hours format using:
Answers:
• %h
• %f
• %F
• %H
21. As a privileged user, you may set the hostname with the command:
Answers:
• name
• hostname
• host
• hn
22. What does GRUB stand for?
Answers:
• Great Unique Bootloader
• Grand Unification Bootloader
• Gum Removal Under Boot
• Grand Unified Bootloader
• Great Ultimate Bootloader
23. The command du -h ~
Answers:
• searches you home directory for duplicate filenames
• duplicates the current process
• dumps your home directory to /tmp
• lists the size of all files within your $HOME with sizes in human readable form
• deletes your account and home directory
24. mount -a' will load all filesystems listed in:
Answers:
• /etc/mtab
• /etc/fstab
• /etc/filesystems
• /etc/fs.conf
25. Which of the following is not an editor?
Answers:
• vi
• emacs
• expr
• ex
26. What is a zombie process?
Answers:
• A zombie process is a process created by a worm to remain active even after it is killed.
• A zombie process is a process which has terminated, but whose parent had not yet read its exit status.
• A zombie process is a process whose status had been saved on the disk, and which is now waiting to be restored.
27. Which return value from an ioctl request indicates success?
Answers:
• EFAULTF
• EINVAL
• EBADF
• ENOTTY
• 0
28. the '-r' switch to the mount command will:
Answers:
• mount removable (e.g., CD-ROM) filesystem
• mount remote (network) filesystems
• mount a filesystem as read-only
• mount filesystem only after a read-write check is performed
29. 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?
Answers:
• sys
• rpm -qa
• pkg
• ls
• query-pkg
30. To access the value of an environment variable, we _____.
Answers:
• add the underscore (_) symbol before the variable name
• type the variable's name (in lower case only)
• add the dollar ($) symbol before the variable name
• add the hash (#) symbol after the variable name
• add the dollar ($) symbol after the variable name
31. uname -a will output...
Answers:
• date where the kernel was built
• kernel info
• cpu info
• All of the answers are correct.
• architecture
32. LILO...
Answers:
• stands for "Light Loader"
• is a type of Linux Distro
• is a boot loader that can boot Linux
• stands for "Lannister-In-Lannister-Out"
• is only used by Slackware
33. To read one or more files and type them on standard output, you use:
Answers:
• biff
• ls
• type
• cat
34. What does the Linux "no" command do?
Answers:
• Nothing; it doesn't exist.
• It returns a non-zero exit code to indicate failure (it's a synonym to the "false" command).
• It's the opposite of the "yes" command; it outputs an infinite series of 'n's (or a word of your choice).
35. What is swap?
Answers:
• Swap is the cache of your HDD
• Swap is the ability to switch between users in one terminal session
• Swap space is the area on a hard disk which is part of the Virtual Memory of your machine (Swap+RAM)
• Swap is the cache of your Physical Memory (RAM)
36. To query DNS (Internet domain name) servers, you use the command:
Answers:
• lsrouted
• dnsquery
• nslookup
• dns
37. LVM is...
Answers:
• Linux Volume Manager
• Logical Volume Manager
• Light Video Manager
• Linux Video Manager
38. What command can be used to delete a directory, recursively searching for files and other directories and deleting them?
Answers:
• rd
• deltree
• rm -r
• rmdir
• rm -d
39. What is the right command to save file and exit in Vim?
Answers:
• :wq!
• :a
• :w 'file name'
• :q!
• :q
40. Consider using the command "cd /a/b/c", then executing "cd ..". What does this last command do?
Answers:
• changes to your home directory
• changes to the / directory
• changes to /a/b directory
• displays the default directory path
• prompts you for the next directory choice
41. Which firewall is most commonly used on Linux?
Answers:
• ipchains
• iptables
• pf
• ipfw
42. To transfer files in an insecure way to and from  a remote network site host, you use the command:
Answers:
• tcp
• ftp
• ucp
• sftp
43. How do you view the documentation for the command 'kill' in the Linux terminal?
Answers:
• doc kill
• kill -help
• kill --help
• cat /etc/docs/kill | less
• man kill
44. To start another shell under the current shell you use the command:
Answers:
• sh
• csh
• bash
• All of these
45. What is GNOME ?
Answers:
• A linux distribution
• A desktop environment and graphical user interface that runs on top of a computer operating system.
• A computer software system and network protocol that provides a basis for graphical user interfaces (GUIs) and rich input device capability for networked computers.
46. The jobs command
Answers:
• provides basic accounting information for all current jobs
• puts all foreground jobs in the background
• prints a dedication to Steve Jobs
• lists background jobs
• halts all foreground jobs
47. Executing "pwd" in shell will return:
Answers:
• There is no such command
• Your password
• None of these
• Current directory
48. Which answer assists you in finding help on the whois command?
Answers:
• man help whois
• man whois
• help whois
• none of these
49. Fedora Linux uses _____ packages.
Answers:
• deb_src
• ebuild
• rpm
• deb
50. Ubuntu is based on...
Answers:
• Fedora
• Debian
• Slackware
• Gentoo
• None of these
51. Add this symbol to a command to run it in the background
Answers:
• *
• ?
• &
• 2
• $
52. _____ is a Linux "desktop environment".
Answers:
• Gnome
• KDE
• XFCe
• All of these
53. To repeat the last command in the bash shell history, type...
Answers:
• !!
• !6
• $HISTFILE
54. The loaded modules in the kernel are listed in /proc/modules. You can get this list using the command:
Answers:
• listmodules
• lsmod
• lsattr
• modules
55. With which userspace is Linux typically paired?
Answers:
• Hurd
• GNU
• System V
• BSD
• Minix
56. The standard Linux shell is:
Answers:
• csh
• ksh
• bash
• sh
57. The netstat command give information on:
Answers:
• routing tables
• all are correct
• active sockets
• open sockets
58. What does the pwd command do?
Answers:
• It launches the power management daemon.
• It asks the password of the current user, and the prompts for a new password.
• It saves the current working directory, so that you can return there with the popd command.
• It prints the path of the current working directory
59. mknod can create special file (used for sending or receiving data) of type:
Answers:
• all are correct
• character file
• block file
• fifo (pipe) file
60. SSH stands for _____.
Answers:
• Security Shell
• Super Shell
• Synchronous Shell
• System Shell
• Secure Shell
61. How do you activate the noclobber shell option?
Answers:
• noclobber
• set -o noclobber
• #NAME?
62. What is TRUE about the Linux operating system?
Answers:
• It is single-user, multi-tasking and free.
• It is multi-user, multi-tasking and free.
• It is multi-user, multi-tasking and proprietary.
• It is single-user, single-tasking and open source.
• It is multi-user, single-tasking and proprietary.
63. The Linux Kernel was written by?
Answers:
• Brian Kernighan
• Richard Stallman
• Linus Torvalds
• Dennis Ritchie
64. What is the ssh command?
Answers:
• It is the standard shell: it has a restricted set of commands, but those are portable across different Linux distributions.
• It is the synchronous shell: all commands are performed in real-time.
• It is the secure shell; it is used to connect to remote hosts via an authenticated and encrypted channel.
• It is the secure shell; it is used to restrict actions available to users.
• It is the synchronous shell: all commands are performed in a synchrous way.
65. What will show you all the subdirectories of the current directory?
Answers:
• rm
• cd
• ls
• cp
66. If you wanted to execute a shell command in the background, which character would you put at the end of the command line?
Answers:
• ;
• &
• :
67. The ''rm'' command is used to:
Answers:
• remove a kernel module owned by you
• run an M4 macro
• delete a file
• mount a remote file system
68. What does it means when the ps commands shows a 'Z' in the status column for a process?
Answers:
• The process is running at top priority.
• The process is in sleep mode.
• The process is running at low priority.
• The process is a zombie process.
69. Which directory contains all the files needed to boot the Linux system?
Answers:
• /dev
• /bin
• /boot
70. 'mkfs' is used to:
Answers:
• format a floppy disk
• create a fast changing section on a hard disk
• create a filesystem on a device (such as a hard disk partition)
• create a named pipe (fifo) on a device
71. /etc/resolv.conf is ...
Answers:
• Network interfaces configuration file
• Configuration file with software sources
• The DNS resolver configuration file
• This file does not exist
• Configuration file with local user accounts and its identificators
72. What makes up a Linux kernel?
Answers:
• base kernel
• all of these
• kernel modules
73. The command "free" reports on:
Answers:
• disk space
• cpu
• memory
74. Which tool is similar to find except that it uses an index to search?
Answers:
• locate
• search
• fastfind
75. What does "chmod 755 file" accomplish?
Answers:
• Makes the file read/write/execute by the owner, read/execute by group and other.
• Makes the file write/read by the owner, execute by group and other.
• Makes the file read by the owner, execute by group and other.
• Makes the file execute by the owner, execute/read by group and other.
• Makes the file write/execute by the owner, execute by group and other.
76. If a host is called HHH, 'rstat HHH' will:
Answers:
• all are correct
• show HHH load averages
• show HHH current time
• show HHH uptime
77. The run level in a system can be configured in the file _____.
Answers:
• /etc/inittab
• /etc/syslev
• /bin/rlev
• /sys/rinit
• /bin/runlev
78. When does /tmp normally get cleaned out?
Answers:
• Every month (run by /etc/cron.monthly).
• Every week (run by /etc/cron.weekly).
• Never; it has to be manually cleaned.
• Every time the system is booted.
79. You want to load the main kernel module for USB support. Which command would help you achieve this task?
Answers:
• modprobe ehci-ocd
• modprobe usbcore
• modprobe uhci-hcd
80. How to reveal detailed information about CPU?
Answers:
• cat /proc/cpuinfo
• dmesg
• cpusage
• sysinfo --cpu
81. LILO is _____.
Answers:
• lists all the devices
• lists all the lower memory areas
• a boot loader
• used for LIsting the boot LOaders
• a type of Linux
82. To print the first 10 lines of one or more files  to the standard output, you use the command:
Answers:
• topf
• start
• head
• ftop
83. Why hasn't ZFS been added to the Linux kernel?
Answers:
• There is a user space port using FUSE
• It's too hard to port filesystems to Linux
• Sun's implementation uses a license incompatible with the GPL
• Oracle is suing the Linux Foundation
84. printenv will:
Answers:
• print a text file to the default printer
• type values of environment variables
• print a text file to the printer specified in /etc/env
• print a text file to the printer specified in $PRINTER
85. Which is an example of a shell comment?
Answers:
• mkdir text # make a directory
• //mkdir text
• mkdir text //make a directory
86. lsof command means:
Answers:
• Lag Spike of Death
• Local System Officer
• Local Service of Files
• Large Scale Optimization File
• List Open Files
87. What is the maximum length of a file name on Linux?
Answers:
• 255 bytes.
• It depends on the file system.
• 1024 bytes.
• 256 bytes.
• 1023 bytes.
88. What flag makes "ls -l" print file sizes in human readable format (e.g. 1K, 231M, 2G, etc)?
Answers:
• -H
• -f
• -h
• -r
89. GRUB stands for _____.
Answers:
• GNU Released Unix Booter
• Great Unix Boot Loader
• Gentoo's Regular Booter
• Grand Unified Boot Loader
90. _____ command starts the default desktop environment.
Answers:
• xterm
• startx
• gnome-terminal
• gdm
• gdm-start
91. The behavior of the system for each "runlevel" is available in the _____ file.
Answers:
• /etc/rlevel
• /etc/inittab
• /etc/mtab
• /etc/hosts
• /etc/crontab
92. modinfo [options] ofile' will:
Answers:
• create a help file for kernel module ofile
• set default handling options for kernel module ofile
• print information about kernel module ofile
• set information about kernel module ofile
93. If DDD is a non empty directory, and you execute 'rmdir DDD', it will:
Answers:
• delete only the contents of the DDD directory
• delete both the contents of and the DDD directory
• move the contents of DDD to /tmp, and delete the DDD directory
• produce an error
94. modprobe...
Answers:
• attempts to load a kernel module along with all its depended modules
• searches all filesystems for the specified module
• searches memory to see if the specified module is loaded to memory
• types the header section of the specified module
95. Which Run Level provides "Full multiuser mode with network and X display manager"?
Answers:
• Run Level 4
• Run Level 2
• Run Level 3
• Run Level 5
• Run Level 1
96. To report the amount of free disk space available  on all mounted file systems you use the command:
Answers:
• du
• free
• fs
• df
97. _____ is not a 'Terminal Emulator'.
Answers:
• xterm
• gnome-terminal
• konsole
• gdm
98. Which of the following accurately describes a "ping?"
Answers:
• sends TCP packets to target device/server to verify if it's online.
• sends ICMP packets to target device/server to verify if it's online.
• makes an audiable ping each time a disk drive start spinning
• verifies that the routing tables comply to the current network state
99. In a ps command output, the PPID displays the:
Answers:
• Process ID
• Parent process ID
• Process's scheduling priority
• Number of memory pages (swap) of the process
100. Which of the following file 'probably' contains the 'user specific' settings for the "windows manager"?
Answers:
• /.xinitrc
• $HOME/.xinitrc
• /X11/xinit/xinitrc
• /xinit/xinitrc
• /etc/X11/xinit/xinitrc
101. To display contents of files on standard output, you could use the command:
Answers:
• All of these
• more
• less
• cat
102. The at command allows you to execute a command at:
Answers:
• a certain date
• a certain holiday
• a certain network
• a certain machine
103. How do you show all processes being run by a particular user?
Answers:
• netstat -u USERNAME
• cat /etc/activeprocess | grep USERNAME
• top -U [USERNAME]
• cat /home/USERNAME/open.process
• top --USERNAME
104. To search one or more files for matching lines,  which command may be used?
Answers:
• egrep
• grep
• All of these
• fgrep
105. Typing the "cd" command at the shell prompt will take you to the _____.
Answers:
• /boot
• /root
• current
• parent
• $HOME
106. Write a command to list all files with 5 characters in the name.
Answers:
• ls !!!!!
• ls *****
• ls ?????
107. What does the $ represent within the context of a shell command?
Answers:
• all of these
• The string after the $ is replaced by a directory name.
• The string after the $ will take on the value of the environment variable with the same name.
108. What is the uid of root?
Answers:
• 1000
• 0
• superuser
• -1
• 1
109. To see the kernel routing tables, you do:
Answers:
• route or netstat -r
• routing
• cat /etc/routetab
• route -w
110. What, according to bc, is 2^2?
Answers:
• 4.00000001
• 2
• A syntax error.
• 4
111. How do you make a list of all filenames in the /tmp directory that the contain the text "user", regardless of case?
Answers:
• ls /tmp : grep user
• grep user /tmp
• ls /tmp | grep user
• ls /tmp | grep -i user
• ls /tmp | find user
112. What source control system does the Linux kernel use?
Answers:
• cvs
• svn
• patches
• bitkeeper
• git
113. The mkraid command will:
Answers:
• move any data on the disk devices used to create the array into the new RAID
• create a new RAID 5 on the disk devices
• initialize a new RAID array, destroying any existing data on the disks used
• separate the disk devices into two groups and will create RAID 1/0 on them
114. rev will:
Answers:
• reverse the spin of a local disk drive
• review the networking status and alert on problems
• reverse the order of characters read from standard input and type the result stream of characters to standard output
• type the system revision number to standard output
115. Single User Mode equivalent to _____.
Answers:
• run level 3
• run level 1
• run level 2
• run level 0
• run level 4
116. What is not part of the Linux Kernel?
Answers:
• C Compiler
• Word Processor
• The bash shell
• All of these
117. Executing the command "init 6" will _____.
Answers:
• set the run level to 0
• reboot the system
• halt the system
• kill the "init" process
• change the user interface to CUI
118. By default what file contains encrypted user passwords?
Answers:
• /etc/master.passwd
• /etc/password
• /etc/passwdinfo
• /etc/passwd
• /etc/shadow
119. Can I have swap partition and swap file activated at the same time?
Answers:
• Only if you set priority of swap containers
• No
• Yes
• Only if you set 'vm.swappiness=100'
120. To send a file to the printer spool queue, you use the command:
Answers:
• print
• spool
• pr
• lpr
121. What does it mean when a variable is unbound?
Answers:
• It exists but is not a displayable type.
• It is not defined.
122. What program is launched by the kernel at system start up first?
Answers:
• /boot
• /sbin/start
• /sbin/init
• /etc/rc.d/rc.sysinit
• /sbin/initial
123. The backslash on the command line indicates
Answers:
• a command pipe
• a regular expression search
• the end of a file
• a one-character escape
• the root directory
124. 'mkdir -m 444 any' will:
Answers:
• create a read-only directory named any
• Create a read-write directory named any
• Create a write-only directory named any
• Create a read-write-execute directory named any
125. In bash you can use these quote marks for command substitution.
Answers:
• backquotes ` `
• single quotes ' '
• backslashes \ \
• double quotes " "
• forward slashes / /
126. "Run Level Zero (0)" stands for _____.
Answers:
• Reboot
• Not Used/User Definable Mode
• Halt
• Single User Mode
• Multi User Mode
127. Which of the following files 'probably' contains the default "windows manager settings"?
Answers:
• /etc/X11/xinit/xinitrc
• $HOME/.xinitrc
• /xinit/xinitrc
• .xinitrc
• /X11/xinit/xinitrc
128. Reset will...
Answers:
• clear your session's screen (terminal)
• restart a program
• disconnect all processes from a disk drive
• reboot a system
129. Which of the following commands can be used to change the run level?
Answers:
• rlev -l
• inittab
• mod-runlevel
• runlevel -c
• init
130. Information about modules, like module dependency, and where certain types of modules reside in the filesystem, is found in:
Answers:
• /etc/modinfo.conf
• /etc/lsmod.conf
• /etc/modules.conf
• /etc/infomod.conf
131. How to display current iptables rules?
Answers:
• iptables -l
• route -n
• iptables --show
• ipfw
• iptables -L
132. To format a device as a Linux second extended filesystem (ext2), you use the command:
Answers:
• Both mke2fs and mkfs.ext2
• mke2fs
• mkfs.ext2
133. What does the following line mean when it is run in a script '#!/bin/bash'?
Answers:
• all of these
• It checks to see if the bash shell exists on the machine.
• It makes sure that the script runs in the bash shell.
134. Given that the ip command is installed, what is the effect of the command  ip a ls
Answers:
• It lists the defined interfaces and the addresses associated with those interfaces.
• It lists the neighbours of the system on an IP network.
• Command "ls" is unknown, try "ip addr help".
135. The acronym WINE stands for:
Answers:
• Wine is Not for Eunichs
• Windows Environment
• Wine is not an Emulator
• Windows Emulator
136. What does permission 641 (octal) mean?
Answers:
• Owner can read and write; group can write; other can read
• Owner can read and execute; group can read and write; other can execute
• Owner can read and write; group can read; other can execute
• Owner can read, write and execute; group can read and write; other can read
• Owner can read and write; group can write and execute; other can read
137. Running "man --locale=LLL" instructs man to override the value of which of these functions?
Answers:
• setlocale()
• local(LLL)
• local()
• whereami()
138. If the system is not in runlevel 0 or 6, before performing a power-off operation, the poweroff command will execute:
Answers:
• shutdown -h
• shutdown -S
• shutdown -r
• shutdown -s
139. The configuration file for the 'X.org' X server is _____.
Answers:
• /etc/X11/Xorg.conf
• /xorg.conf
• /Xorg.conf
• /etc/X11/xorg.conf
140. 'mv -u' will:
Answers:
• will translate DOS formatted files to Unix format (e.g., will change end-of-line characters)
• not remove a file or link if its modification date is the same as or newer than that of its replacement
• will create a backup of the target so an 'undo' is possible
• undo the last mv command performed on the same filesystem
141. In the command 'mv source target', if source is a directory and target is an existing directory, the result will be to:
Answers:
• merge 'target' directory with 'source' directory
• overwrite 'target' directory with 'source' directory
• move 'source' directory to be a subdirectory of 'target' directory
• move 'source' directory to be on same level in the directory tree as 'target' directory
142. Which of the following is a way to update mlocate's index?
Answers:
• find -mlocate
• dbupdate
• mlocate -u
• dbmlocate
• updatedb
143. What will "cat /proc/mdstat" tell you?
Answers:
• "cat: /proc/mdstat: No such file or directory" :P
• The state of your RAID file system (if any).
• The MD5 hash of the running kernel for security/integrity purposes.
• The magnetic tape drive's status (if any).
• The list of MSDOS file systems that you have mounted (if any).
144. For what purposes can socat be used?
Answers:
• IPv6 to IPv4 bridging
• Bridging a TCP and UDP service
• SOCKS Proxy
• Concatenating arbitrary pcap files to the network
• All of these
145. newaliases will:
Answers:
• types all the aliases the news reader uses
• updates the news reader's aliases from the file /etc/aliases
• rebuild the mail aliases database that reside in /etc/aliases
146. What will you get if you try to read from the pseudo-device /dev/null?
Answers:
• An error (/dev/null can only be written to, not read from).
• An infinite string of nulls ('\0', ASCII 0x00).
• An infinite string of zeroes ('0', ASCII 0x30).
• Nothing.
147. What happens if you try to write to /dev/null and /dev/zero?
Answers:
• You cannot write to /dev/zero, only to /dev/null.
• You cannot write to either of them, only read from them.
• Nothing.
• You cannot write to /dev/null, only to /dev/zero.
148. 'mktemp -d' will:
Answers:
• will create a swap filesystem
• will create a dump filesystem
• create a unique temporary directory (e.g., for script's commands usage)
• will create a temporary filesystem
149. The ________ command can be used to "kill" the 'X server'.
Answers:
• Ctrl + D
• Ctrl + X
• Ctrl + Alt + Bksp
• Ctrl + Alt + Del
• Ctrl + Shift + Bksp
150. nfsstat will...
Answers:
• display an NFS user status on both server and client side systems
• create or update remote NFS users from entries in the file /etc/nfsstat
• activate kernel threads for the NFS (Network File System) kernel module
• type statistics on NFS and remote procedure call (RPC) activity for both client and server systems
151. How find the current system runlevel?
Answers:
• init
• sys level show
• runlevel -h
• runlevel
• init -q
152. To do unlimited precision arithmetic  calculations from the shell, you use:
Answers:
• bc
• cal
• All of these
• calc
153. Which of the following commands will correctly display the version of the Linux kernel running?
Answers:
• uname -r
• uname -o
• None of these commands work
• sysinfo
• All three commands work
154. How are typical native code debuggers implemented?
Answers:
• By a special system call that allows one process to control and trace execution of another.
• Using virtualization technology.
• By requesting the kernel scheduler to suspend the traced process and then analyzing its memory segments.
• By loading traced program's code into the heap segment of the debugger which then acts as a virtual machine.
155. To format a device as an ext3 (journaled) Linux extended filesystem, you use the commands:
Answers:
• mkfs.ext3
• mkfs.ext2 -j
• all are correct
156. What does the Linux "yes" command do?
Answers:
• It returns the exit code 0 to indicate success (it's a synonym to the "true" command).
• Nothing; it doesn't exist.
• It outputs an infinite series of 'y's (or the word of your choice).
157. What is the expected output of the following command:  unset x; test -z $x && echo 1
Answers:
• Nothing.
• It depends: an error, if x is not set; nothing otherwise
• 1
• 0
• It depends: an error, if x is not set; 1 otherwise
158. What is the purpose of the "tset" command?
Answers:
• To control thread execution.
• None; there is no such command in standard Linux.
• To catch misspellings of the "test" command (they're the same).
• To set a temporary variable.
• To identify and initialize a terminal.
159. /bin/true is a command whose exit status is always:
Answers:
• 0
• True
• False
• 1
160. Which of the following commands shows routing table information?
Answers:
• netstat
• routeshow
• route --list
• ip route get
• ip route show
161. Man pages are written using what markup language?
Answers:
• UTF-8
• RTF
• TROFF
• PERLDOC
• HTML
162. As a non-privileged user, if you use 'nice', it will:
Answers:
• execute a command with a set priority (may be higher)
• reshuffle directory entries, so ls will produce a pretty display
• will lower already running background processes priority
• execute a command with lower priority
163. What is cgroups ?
Answers:
• Feature to control user permissions
• Special group of users, that can use sudo
• Linux kernel feature to control resource usage
• Command to create new group of users
• This technology is not implemented in linux
164. Which command is used for initializing physical volume(hard disk, or partition) for LVM usage?
Answers:
• pvinit
• pvck
• lvm -p create
• pvmake
• pvcreate
165. To create hard-links instead of copies with the cp command, you use:
Answers:
• --cp
• --perm-link
• All of these
• -l
166. What is the file /etc/nsswitch.conf?
Answers:
• name server information
• tool to configure Ethernet switch
• facility that provides a variety of sources for common configuration databases and name resolution mechanisms
• a PAM (Pluggable authentication modules) configuration file
• Windows manager configuration file
167. 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.
Answers:
• -A
• -B
• -E
• -C
• -D
168. To print the target of a symbolic link file, you use:
Answers:
• file
• cat
• ls
• readlink
169. 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?
Answers:
• foo
• Nothing.
• foo*: No such file or directory.
• foo*
• echo: No such file or directory.
170. Which one of these lines will check if the directory "foo" exists and create it if it doesn't?
Answers:
• mkdir -p foo
• All but one of them.
• if [ ! -d foo ]; then mkdir foo; fi
• test -d foo || mkdir foo
• All of them.
171. The cksum command will read from standard input if:
Answers:
• All of these
• '.' is used
• =' is used
• '-' is used
172. in terms of system calls, when bash process executes cat </tmp/input command it does the following:
Answers:
• issues the exec system call to execute the cat program and then issues a system call to substitute standard input with /tmp/input
• issues a system call to create a new copy of itself, in that copy it issues a system call to close the lowest file descriptor, then issues a system call to open /tmp/input and finally issues the exec system call to execute the cat program
• issues the exec system call to execute the cat program, then issues a system call to close the lowest file descriptor and finally issues a system call to open /tmp/input
• issues a system call to create a new copy of itself, in that copy it issues a system call to substitute standard input with /tmp/input and finally issues the exec system call to execute the cat program
173. What is the maximum size of an ext3 file system?
Answers:
• There is no theoretical limit.
• 256 TiB (281,474,976,710,656 bytes).
• 1 EiB (1,152,921,504,606,846,976 bytes).
• 32 TiB (35,184,372,088,832 bytes).
• 1 PiB (1,125,899,906,842,624 bytes).
174. What does the command "set $(date)" do?
Answers:
• It displays the current system's setup date
• It displays the system date
• It changes the order of the date fields
• It sets the system date
• It parses the system date into command line parameters $1 - $6
175. In a file delimited by commas, what command will print the 3rd column of data:
Answers:
• awk -F, '{print $3}'
• awk '{print $3}'
• awk -f, '{print $3}'
176. Which command will tell you how long a system has been up and running since it was last booted?
Answers:
• uptime
• w
• All answers are correct.
• cat /proc/uptime
• who -b
177. What are the six fields of /etc/fstab?
Answers:
• Device, mount point, file system type, mount options, dump frequency, fsck pass number.
• Device, mount point, mount options, file system type, dump frequency, fsck pass number.
• Device, mount point, file system type, mount options, fsck pass number, dump frequency.
• Six fields? There are only five: Device, mount point, mount options, and two more fields that are no longer used.
• Device, mount point, mount options, file system type, fsck pass number, dump frequency.
178. modprobe -d:
Answers:
• deactivate a module in memory.
• specifies the directory where modules can be found.
• deletes a module from the filesystem.
• deletes a module from memory.
• types debugging information regarding a module.
179. The equivalent to whatis command is:
Answers:
• what -a
• w
• apropos
• man -f
180. What is the default delimiter for the command "cut"?
Answers:
• \0
• <TAB> or <SPACE>
• <TAB>
• <SPACE>
• \n
181. What is the result of echo '$MyVar' ?
Answers:
• $MyVar
• MyVar
• the value of $MyVar
182. 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?
Answers:
• Editing CopyOfFile will affect OriginalFile
• Moving OriginalFile to a new directory will cause CopyOfFile to become a broken link
• All of these are true
• Deleting CopyOfFile will delete OriginalFile
• None of these are true
183. The ____ command will display LVM volume groups.
Answers:
• vglist
• vgstatus
• lvshow
• vgl
• vgdisplay
184. What file will show you how the kernel was started?
Answers:
• /boot/grub/menu.lst
• /proc/bootargs
• /boot/grub/grub.conf
• /proc/cmdline
185. Can `ip` in iproute2 take multiple commands in a row?
Answers:
• Yes, using `ip -sequence`
• Yes, using `ip --file`
• Yes, using `ip -f`
• Yes, using `ip -batch`
• No
186. Apart from SIGKILL, which other signal cannot be caught nor ignored?
Answers:
• SIGPWR
• SIGTRAP
• SIGSTOP
• SIGXCPU
• SIGSYS
187. Will tar extract information about file permissions?
Answers:
• Yes, if "-p" specified or is root.
• Yes, only if it's root.
• Yes, only on NTFS volumns.
• No.
• Yes, only if "-p" specified.
188. The last privileged port (any port that can't be opened by anyone else but the root user) is:
Answers:
• 1025
• 1024
• 1023
• 999
189. 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:
Answers:
• s
• t
• l
• y
190. newgrp will:
Answers:
• change user's group ID (GID)
• change group's parameters
• create a new group on the system
• create a new group and potentially add users to it
191. To block/allow regular users to send write messages to your session, you use:
Answers:
• mesg
• block [-y|-n]
• write -q
• term -q
192. In BASH scripts the symbols "<<" indicate...
Answers:
• rapid query
• left shift
• input redirection
• much less than
• a "here" document
193. What will you get if you try to read from the pseudo-device /dev/zero?
Answers:
• An infinite string of nulls ('\0', ASCII 0x00).
• An error (/dev/zero cannot be read from, only written to).
• Nothing.
• An infinite string of zeroes ('0', ASCII 0x30).
194. Which file would be returned by ls File[A5] ?
Answers:
• FileA
• FileAB
• none of these
• FileA5
195. Can you make hard links to directories just as you can to ordinary files?
Answers:
• Sometimes, depending on file system restrictions.
• No, that would corrupt the requirement that every file only has one parent directory.
• Yes, there's no difference between hard linking files / directories.

• Yes, but only in single user mode.

No comments:

Post a Comment