Question:* What is the linux mascot?
Answer: • Penguin
Question:* True or false: The Linux OS is not affected by malware.
Answer: • False
Question:* The user smith issued the egrep "^[[:upper:]]" words.txt command. What does this command do?
Answer: • displays all lines in the words.txt file that begin with an uppercase letter
Question:* pwconv will...
Answer: • convert entries in /etc/passwd (un-shadowed) into shadowed entries in /etc/shadow
Question:* How do you find all files in /etc which end in .conf?
Answer: • find /etc -name "*.conf"
Question:* options (switches) to the ps command may start with:
Answer: • all are correct
Question:* In a BASH script this command line parameter contains the scripts own name:
Answer: • $0
Question:* To write a message to all users (on their terminals) over a network, you use:
Answer: • wall
Question:* What is "vmlinuz"?
Answer: • It is a "compressed Linux kernel".
Question:* What binary format do Linux Executables use?
Answer: • ELF
Question:* SSH uses _____ to authenticate remote computers.
Answer: • public key cryptography
Question:* How do you redirect stderr to stdout?
Answer: • Using 2>&1
Question:* Is it possible to increase SWAP space without rebooting?
Answer: • Yes if you create a swap file
Question:* What does the "uname" command do?
Answer: • print system information
Question:* 'mv -f' will:
Answer: • even if the target file exists, the operation will be carried out (and no warning messages on restricted access modes will be printed)
Question:* To use chown recursively, instead of using _recursive you can use:
Answer: • -R
Question:* To create one or more directories with the mkdir command, which permissions in the directory's parent directory do you need?
Answer: • write
Question:* How would you create an alias for the cat command?
Answer: • alias bkw=cat
Question:* If you use the rm command to accidentally delete a file, how can you get the file back?
Answer: • You cannot get the file back.
Question:* In a date +format, you add the hour in 24 hours format using:
Answer: • %H
Question:* As a privileged user, you may set the hostname with the command:
Answer: • hostname
Question:* What does GRUB stand for?
Answer: • Grand Unified Bootloader
Question:* The command du -h ~
Answer: • lists the size of all files within your $HOME with sizes in human readable form
Question:* mount -a' will load all filesystems listed in:
Answer: • /etc/fstab
Question:* Which of the following is not an editor?
Answer: • expr
Question:* What is a zombie process?
Answer: • A zombie process is a process which has terminated, but whose parent had not yet read its exit status.
Question:* Which return value from an ioctl request indicates success?
Answer: • 0
Question:* the '-r' switch to the mount command will:
Answer: • mount a filesystem as read-only
Question:* 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?
Answer: • rpm -qa
Question:* To access the value of an environment variable, we _____.
Answer: • add the dollar ($) symbol before the variable name
Question:* uname -a will output...
Answer: • All of the answers are correct.
Question:* LILO...
Answer: • is a boot loader that can boot Linux
Question:* To read one or more files and type them on standard output, you use:
Answer: • cat
Question:* What does the Linux "no" command do?
Answer: • Nothing; it doesn't exist.
Question:* What is swap?
Answer: • Swap space is the area on a hard disk which is part of the Virtual Memory of your machine (Swap+RAM)
Question:* To query DNS (Internet domain name) servers, you use the command:
Answer: • nslookup
Question:* LVM is...
Answer: • Logical Volume Manager
Question:* What command can be used to delete a directory, recursively searching for files and other directories and deleting them?
Answer: • rm -r
Question:* What is the right command to save file and exit in Vim?
Answer: • :wq!
Question:* Consider using the command "cd /a/b/c", then executing "cd ..". What does this last command do?
Answer: • changes to /a/b directory
Question:* Which firewall is most commonly used on Linux?
Answer: • iptables
Question:* To transfer files in an insecure way to and from a remote network site host, you use the command:
Answer: • ftp
Question:* How do you view the documentation for the command 'kill' in the Linux terminal?
Answer: • man kill
Question:* To start another shell under the current shell you use the command:
Answer: • All of these
Question:* What is GNOME ?
Answer: • A desktop environment and graphical user interface that runs on top of a computer operating system.
Question:* The jobs command
Answer: • lists background jobs
Question:* Executing "pwd" in shell will return:
Answer: • Current directory
Question:* Which answer assists you in finding help on the whois command?
Answer: • man whois
Question:* Fedora Linux uses _____ packages.
Answer: • rpm
Question:* Ubuntu is based on...
Answer: • Debian
Question:* Add this symbol to a command to run it in the background
Answer: • &
Question:* _____ is a Linux "desktop environment".
Answer: • All of these
Question:* To repeat the last command in the bash shell history, type...
Answer: • !!
Question:* The loaded modules in the kernel are listed in /proc/modules. You can get this list using the command:
Answer: • lsmod
Question:* With which userspace is Linux typically paired?
Answer: • GNU
Question:* The standard Linux shell is:
Answer: • bash
Question:* The netstat command give information on:
Answer: • all are correct
Question:* What does the pwd command do?
Answer: • It prints the path of the current working directory
Question:* mknod can create special file (used for sending or receiving data) of type:
Answer: • all are correct
Question:* SSH stands for _____.
Answer: • Secure Shell
Question:* How do you activate the noclobber shell option?
Answer: • set -o noclobber
Question:* What is TRUE about the Linux operating system?
Answer: • It is multi-user, multi-tasking and free.
Question:* The Linux Kernel was written by?
Answer: • Linus Torvalds
Question:* What is the ssh command?
Answer: • It is the secure shell; it is used to connect to remote hosts via an authenticated and encrypted channel.
Question:* What will show you all the subdirectories of the current directory?
Answer: • ls
Question:* If you wanted to execute a shell command in the background, which character would you put at the end of the command line?
Answer: • &
Question:* The ''rm'' command is used to:
Answer: • delete a file
Question:* What does it means when the ps commands shows a 'Z' in the status column for a process?
Answer: • The process is a zombie process.
Question:* Which directory contains all the files needed to boot the Linux system?
Answer: • /boot
Question:* 'mkfs' is used to:
Answer: • create a filesystem on a device (such as a hard disk partition)
Question:* /etc/resolv.conf is ...
Answer: • The DNS resolver configuration file
Question:* What makes up a Linux kernel?
Answer: • all of these
Question:* The command "free" reports on:
Answer: • memory
Question:* Which tool is similar to find except that it uses an index to search?
Answer: • locate
Question:* What does "chmod 755 file" accomplish?
Answer: • Makes the file read/write/execute by the owner, read/execute by group and other.
Question:* If a host is called HHH, 'rstat HHH' will:
Answer: • all are correct
Question:* The run level in a system can be configured in the file _____.
Answer: • /etc/inittab
Question:* When does /tmp normally get cleaned out?
Answer: • Every time the system is booted.
Question:* You want to load the main kernel module for USB support. Which command would help you achieve this task?
Answer: • modprobe usbcore
Question:* How to reveal detailed information about CPU?
Answer: • cat /proc/cpuinfo
Question:* LILO is _____.
Answer: • a boot loader
Question:* To print the first 10 lines of one or more files to the standard output, you use the command:
Answer: • head
Question:* Why hasn't ZFS been added to the Linux kernel?
Answer: • Sun's implementation uses a license incompatible with the GPL
Question:* printenv will:
Answer: • type values of environment variables
Question:* Which is an example of a shell comment?
Answer: • mkdir text # make a directory
Question:* lsof command means:
Answer: • List Open Files
Question:* What is the maximum length of a file name on Linux?
Answer: • It depends on the file system.
Question:* What flag makes "ls -l" print file sizes in human readable format (e.g. 1K, 231M, 2G, etc)?
Answer: • -h
Question:* GRUB stands for _____.
Answer: • Grand Unified Boot Loader
Question:* _____ command starts the default desktop environment.
Answer: • startx
Question:* The behavior of the system for each "runlevel" is available in the _____ file.
Answer: • /etc/inittab
Question:* modinfo [options] ofile' will:
Answer: • print information about kernel module ofile
Question:* If DDD is a non empty directory, and you execute 'rmdir DDD', it will:
Answer: • produce an error
Question:* modprobe...
Answer: • attempts to load a kernel module along with all its depended modules
Question:* Which Run Level provides "Full multiuser mode with network and X display manager"?
Answer: • Run Level 5
Question:* To report the amount of free disk space available on all mounted file systems you use the command:
Answer: • df
Question:* _____ is not a 'Terminal Emulator'.
Answer: • gdm
Question:* Which of the following accurately describes a "ping?"
Answer: • sends ICMP packets to target device/server to verify if it's online.
Question:* In a ps command output, the PPID displays the:
Answer: • Parent process ID
Question:* Which of the following file 'probably' contains the 'user specific' settings for the "windows manager"?
Answer: • $HOME/.xinitrc
Question:* To display contents of files on standard output, you could use the command:
Answer: • All of these
Question:* The at command allows you to execute a command at:
Answer: • a certain date
Question:* How do you show all processes being run by a particular user?
Answer: • top -U [USERNAME]
Question:* To search one or more files for matching lines, which command may be used?
Answer: • All of these
Question:* Typing the "cd" command at the shell prompt will take you to the _____.
Answer: • $HOME
Question:* Write a command to list all files with 5 characters in the name.
Answer: • ls ?????
Question:* What does the $ represent within the context of a shell command?
Answer: • The string after the $ will take on the value of the environment variable with the same name.
Question:* What is the uid of root?
Answer: • 0
Question:* To see the kernel routing tables, you do:
Answer: • route or netstat -r
Question:* What, according to bc, is 2^2?
Answer: • 4
Question:* How do you make a list of all filenames in the /tmp directory that the contain the text "user", regardless of case?
Answer: • ls /tmp | grep -i user
Question:* What source control system does the Linux kernel use?
Answer: • git
Question:* The mkraid command will:
Answer: • initialize a new RAID array, destroying any existing data on the disks used
Question:* rev will:
Answer: • reverse the order of characters read from standard input and type the result stream of characters to standard output
Question:* Single User Mode equivalent to _____.
Answer: • run level 1
Question:* What is not part of the Linux Kernel?
Answer: • All of these
Question:* Executing the command "init 6" will _____.
Answer: • reboot the system
Question:* By default what file contains encrypted user passwords?
Answer: • /etc/shadow
Question:* Can I have swap partition and swap file activated at the same time?
Answer: • Yes
Question:* To send a file to the printer spool queue, you use the command:
Answer: • lpr
Question:* What does it mean when a variable is unbound?
Answer: • It is not defined.
Question:* What program is launched by the kernel at system start up first?
Answer: • /sbin/init
Question:* The backslash on the command line indicates
Answer: • a one-character escape
Question:* 'mkdir -m 444 any' will:
Answer: • create a read-only directory named any
Question:* In bash you can use these quote marks for command substitution.
Answer: • backquotes ` `
Question:* "Run Level Zero (0)" stands for _____.
Answer: • Halt
Question:* Which of the following files 'probably' contains the default "windows manager settings"?
Answer: • /etc/X11/xinit/xinitrc
Question:* Reset will...
Answer: • clear your session's screen (terminal)
Question:* Which of the following commands can be used to change the run level?
Answer: • init
Question:* Information about modules, like module dependency, and where certain types of modules reside in the filesystem, is found in:
Answer: • /etc/modules.conf
Question:* How to display current iptables rules?
Answer: • iptables -L
Question:* To format a device as a Linux second extended filesystem (ext2), you use the command:
Answer: • Both mke2fs and mkfs.ext2
Question:* What does the following line mean when it is run in a script '#!/bin/bash'?
Answer: • It makes sure that the script runs in the bash shell.
Question:* Given that the ip command is installed, what is the effect of the command ip a ls
Answer: • It lists the defined interfaces and the addresses associated with those interfaces.
Question:* The acronym WINE stands for:
Answer: • Wine is not an Emulator
Question:* What does permission 641 (octal) mean?
Answer: • Owner can read and write; group can read; other can execute
Question:* Running "man --locale=LLL" instructs man to override the value of which of these functions?
Answer: • setlocale()
Question:* If the system is not in runlevel 0 or 6, before performing a power-off operation, the poweroff command will execute:
Answer: • shutdown -h
Question:* The configuration file for the 'X.org' X server is _____.
Answer: • /etc/X11/xorg.conf
Question:* 'mv -u' will:
Answer: • not remove a file or link if its modification date is the same as or newer than that of its replacement
Question:* In the command 'mv source target', if source is a directory and target is an existing directory, the result will be to:
Answer: • move 'source' directory to be a subdirectory of 'target' directory
Question:* Which of the following is a way to update mlocate's index?
Answer: • updatedb
Question:* What will "cat /proc/mdstat" tell you?
Answer: • The state of your RAID file system (if any).
Question:* For what purposes can socat be used?
Answer: • All of these
Question:* newaliases will:
Answer: • rebuild the mail aliases database that reside in /etc/aliases
Question:* What will you get if you try to read from the pseudo-device /dev/null?
Answer: • Nothing.
Question:* What happens if you try to write to /dev/null and /dev/zero?
Answer: • Nothing.
Question:* 'mktemp -d' will:
Answer: • create a unique temporary directory (e.g., for script's commands usage)
Question:* The ________ command can be used to "kill" the 'X server'.
Answer: • Ctrl + Alt + Bksp
Question:* nfsstat will...
Answer: • type statistics on NFS and remote procedure call (RPC) activity for both client and server systems
Question:* How find the current system runlevel?
Answer: • runlevel
Question:* To do unlimited precision arithmetic calculations from the shell, you use:
Answer: • bc
Question:* Which of the following commands will correctly display the version of the Linux kernel running?
Answer: • uname -r
Question:* How are typical native code debuggers implemented?
Answer: • By a special system call that allows one process to control and trace execution of another.
Question:* To format a device as an ext3 (journaled) Linux extended filesystem, you use the commands:
Answer: • all are correct
Question:* What does the Linux "yes" command do?
Answer: • It outputs an infinite series of 'y's (or the word of your choice).
Question:* What is the expected output of the following command: unset x; test -z $x && echo 1
Answer: • 1
Question:* What is the purpose of the "tset" command?
Answer: • To identify and initialize a terminal.
Question:* /bin/true is a command whose exit status is always:
Answer: • 0
Question:* Which of the following commands shows routing table information?
Answer: • ip route show
Question:* Man pages are written using what markup language?
Answer: • TROFF
Question:* As a non-privileged user, if you use 'nice', it will:
Answer: • execute a command with lower priority
Question:* What is cgroups ?
Answer: • Linux kernel feature to control resource usage
Question:* Which command is used for initializing physical volume(hard disk, or partition) for LVM usage?
Answer: • pvcreate
Question:* To create hard-links instead of copies with the cp command, you use:
Answer: • -l
Question:* What is the file /etc/nsswitch.conf?
Answer: • facility that provides a variety of sources for common configuration databases and name resolution mechanisms
Question:* 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.
Answer: • -A
Question:* To print the target of a symbolic link file, you use:
Answer: • readlink
Question:* 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?
Answer: • foo*
Question:* Which one of these lines will check if the directory "foo" exists and create it if it doesn't?
Answer: • All of them.
Question:* The cksum command will read from standard input if:
Answer: • '-' is used
Question:* in terms of system calls, when bash process executes cat </tmp/input command it does the following:
Answer: • 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
Question:* What is the maximum size of an ext3 file system?
Answer: • 32 TiB (35,184,372,088,832 bytes).
Question:* What does the command "set $(date)" do?
Answer: • It parses the system date into command line parameters $1 - $6
Question:* In a file delimited by commas, what command will print the 3rd column of data:
Answer: • awk -F, '{print $3}'
Question:* Which command will tell you how long a system has been up and running since it was last booted?
Answer: • All answers are correct.
Question:* What are the six fields of /etc/fstab?
Answer: • Device, mount point, file system type, mount options, dump frequency, fsck pass number.
Question:* modprobe -d:
Answer: • specifies the directory where modules can be found.
Question:* The equivalent to whatis command is:
Answer: • man -f
Question:* What is the default delimiter for the command "cut"?
Answer: • <TAB>
Question:* What is the result of echo '$MyVar' ?
Answer: • $MyVar
Question:* 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?
Answer: • Editing CopyOfFile will affect OriginalFile
Question:* The ____ command will display LVM volume groups.
Answer: • vgdisplay
Question:* What file will show you how the kernel was started?
Answer: • /proc/cmdline
Question:* Can `ip` in iproute2 take multiple commands in a row?
Answer: • Yes, using `ip -batch`
Question:* Apart from SIGKILL, which other signal cannot be caught nor ignored?
Answer: • SIGSTOP
Question:* Will tar extract information about file permissions?
Answer: • Yes, if "-p" specified or is root.
Question:* The last privileged port (any port that can't be opened by anyone else but the root user) is:
Answer: • 1023
Question:* 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:
Answer: • t
Question:* newgrp will:
Answer: • change user's group ID (GID)
Question:* To block/allow regular users to send write messages to your session, you use:
Answer: • mesg
Question:* In BASH scripts the symbols "<<" indicate...
Answer: • a "here" document
Question:* What will you get if you try to read from the pseudo-device /dev/zero?
Answer: • An infinite string of nulls ('\0', ASCII 0x00).
Question:* Which file would be returned by ls File[A5] ?
Answer: • FileA
Question:* Can you make hard links to directories just as you can to ordinary files?
Answer: • Sometimes, depending on file system restrictions.
No comments:
Post a Comment