Last Updated on October 23, 2022 by InfraExam

Final Comprehensive Exam (Ch 1-18) Exam

  1. Shell variables are case sensitive.

    True or False?

    • True 
    • False
  2. Which command can be used to display both local and environment variables?

    • set
    • export -p
    • declare -x
    • env
  3. The command PATH=$PATH:/home/Alice does the following:

    • Creates a new PATH variable with only the /home/Alice directory as the value 
    • Appends the directory /home/Alice to the existing PATH variable 
    • Does nothing, because anything after the : is discarded 
    • Replaces the existing directories in the PATH with the /home/Alice directory
  4. If the HISTIGNORE='ls*' command is placed in the ~/.bash_profile file, which of the following commands would not be placed in the history list?

    • cd 
    • history
    • cat 
    • ls -la
  5. Typical BASH exit scripts are found in ~/.bash_logout and __________ files.

    • /etc/profile 
    • ~/.bash_profile 
    • /etc/bash_logout 
    • /etc/bashrc
  6. The bash script_file command can be used to directly execute a shell script.

    True or False?

    • True 
    • False
  7. The __________ statement can be used to gather information from the user running the script. 

    • read 
    • for 
    • if 
    • seq
  8. In shell scripts, the conditional statement if must always end with:

    • False condition 
    • elif 
    • then 
    • fi
  9. What will the following statement do?

    for name in `cat /root/users`
    • Get into an infinite loop
    • Assign to the name variable each value in the specified file 
    • Report an error 
    • Run for two values; cat and /root/users
  10. Which of the following file test statement conditions is not correct?

    • -e filename tests if the file exists 
    • -d filename tests if the file is in the current directory 
    • -w filename tests a file to determine if it is writable 
    • -x filename tests a file to determine if it is executable
  11. The system administrator wants to use the keyboard for moving the mouse pointer around the screen. This is done by implementing:

    • Mouse keys 
    • Repeat keys 
    • Toggle keys 
    • Bounce keys
  12. Which of the following applications can be used to read aloud the text from a file? 

    • Orca 
    • Espeak 
    • Emacspeak 
    • All choices are valid
  13. The _________ key setting can prevent the user from accidentally repeating keys if they type too slowly.

    • Repeat 
    • Toggle 
    • Slow 
    • Sticky
  14. The /etc/passwd file can be modified by which of the following?

    • Group account 
    • Any user 
    • Remote user 
    • Root user
  15. A normal user, joe has the following record in the /etc/passwd file. What does the x indicate?joe:x:1021:1020:purchase_dept_user:/home/usr/joe:/bin/bash

    • The joe user has not yet set his password 
    • Password for user joe is locked 
    • The encrypted password has been stored in the /etc/shadow file 
    • Password for user joe is x
  16. Which of the following info about users is not present in passwd file record?

    • The user’s home directory 
    • The user’s shell 
    • The user’s account name 
    • The user’s password
  17. A regular user wants a password that never expires. The Maximum field value in the /etc/shadow file should be set to:

    • No value 
    • 1 
    • 99999
  18. In the /etc/shadow file, a user record has !! as the first two characters in the encrypted password field. What does this signify?

    • The account is locked 
    • No significance, it is encrypted text 
    • The password is about to expire 
    • The password has !! as the first two characters
  19. The ___________ command can be used to display group membership for a particular user.

    • groups 
    • getent 
    • newgrp 
    • showgrp
  20. An account on a Linux system has a UID of 50. Which type of account is this?

    • System account 
    • Temporary account 
    • Regular user account 
    • Group account
  21. Which of the following commands will allow the root user to create a new group for the sales department and assign this new group the GID of 1250? 

    • groupadd sales_group -n 1250 
    • Specific GID cannot be assigned 
    • groupadd sales_group -g 1250 
    • groupadd sales_group 1250
  22. Which file is used to set the user’s locale permanently? 

    • ~/.profile 
    • ~/.forward 
    • ~/.lang 
    • ~/.login
  23. Linux systems keep time in ____. 

    • UST 
    • IST 
    • UTC 
    • GMT
  24. Which command is used to verify time zone changes?

    • nls 
    • date 
    • systime
    • sysdate
  25. Which of the following is not a capability of Unicode characters? 

    • Supports mathematical and technical symbols 
    • Can be used in file names 
    • User applications can display Unicode files 
    • Uses separate language packs for each language
  26. The ______ mapping method is supported by Unicode.

    • Universal Formatting Set 
    • Universal Character Set (UCS) 
    • Universal Locale Set (ULS) 
    • Universal Transformation Set (UTS)
  27. SMTP is the standard protocol for communication between email server and mail client.

    True or False?

    • True
    • False
  28. The ____________ file is used to configure the sendmail daemon.

    • /etc/rc.1 
    • /etc/mail/ 
    • /etc/mail.conf 
    • /etc/mail.mail.c
  29. Which of the following changes is not possible by modifying various settings in the CUPS configuration file? 

    • Port to listen for printer information packets 
    • Maximum number of copies that a user can print per job 
    • Maximum number of printers that can be configured 
    • Allow access from the specified host
  30. Identify the correct command to view the status of all printers:

    • lpq -a 
    • lpq -P hpfloor1 
    • lpq 
    • lpr
  31. Which is the standard port used for HTTP service? 

    • 161 
    • 80 
    • 25 
    • 110
  32. Which file holds the list of the name servers? 

    • /etc/resolv.conf 
    • /etc/host.conf 
    • /etc/nameservers.conf 
    • /etc/dns.conf
  33. Which file is referred to by the Name Service Switch (NSS) resolver? 

    • /etc/hosts 
    • /etc/nssconfig.conf 
    • /etc/resolv.conf 
    • /etc/nsswitch.conf
  34. The routing table shows an entry with genmask, this indicates the _____. 

    • Default Subnet Mask 
    • Default Name Server 
    • Default Host 
    • Default Route
  35. Which command is used to setup broadcast addresses for a network interface?

    • host 
    • route 
    • ifconfig 
    • ip broadcast
  36. System crontab files are generally found in which of the following directories? 

    • /etc/crontab and /etc/cron.d 
    • /etc and /bin 
    • /root and /etc 
    • /var/spool/cron.d and /etc/cron
  37. The system administrator wants to create a crontab entry to perform daily backups.

    Which of the following keywords should be used? 

    • Cannot be done 
    • @today 
    • @daily
    • @backup
  38. A Linux server, configured for the UTC time zone, is accessed by users from other time zones. The cron jobs scheduled on the server will run:

    • As per the time zone of location where the server is kept
    • As per UTC time zone 
    • As per the time zone of respective users 
    • As per the TZ environment variable setting in the crontab file
  39. After executing theatqcommand, the following jobs are displayed: 

    2     2014-11-22 22:00 a test_user 
    3     2014-11-22 20:00 a root
    4     2014-11-22 22:45 a oracle_dba

     Which of the following commands will delete job 2?

    • atrm 2 
    • atrm test_user
    • at -r 2 
    • test_user should manually delete the entry
  40. The default value for load average for running the batch command can be changed using which of the following commands?

    • atd -l
    • atd -n 
    • atd -o 
    • It cannot be changed
  41. When the system boots, the system clock is set using the value of the hardware clock.

    True or False?

    • True 
    • False
  42. The ___________ command is used to update the RTC clock.

    • clock 
    • net-time 
    • time 
    • hwclock
  43. Which of the following commands will set the system time to the same time as the hardware clock? 

    • hwclock -s 
    • hwclock -r 
    • hwclock -w 
    • hwclock --set --date "current system time"
  44. The reference time used by NTP is: 

    • CMOS clock time 
    • GMT + 0.5 
    • UTC 
    • Local time on the primary server
  45. The daemon that provides logging services for applications and programs is:

    • klogd 
    • applog 
    • SNMP 
    • syslogd
  46. Which of the following commands is not used to view log files on a Linux operating system?

    • echo
    • grep
    • less
    • tail
  47. Which of the following files contains general and system related messages?

    • /var/log/rsyslog 
    • /var/log/maillog
    • /var/log/boot.log
    • /var/log/cron.log
  48. The ____________ command is used to send messages to the system logging facility. 

    • notice
    • timer 
    • queue 
    • logger
  49. You need to restart the network service and you are not the root user. Which command can you use?

    • chmod
    • usermod
    • chown
    • sudo
  50. Which password is required for authentication to use sudo

    • No authentication is required 
    • Root Password 
    • Password of the user who owns the application 
    • User’s Password
  51. Which file stores the encrypted password?

    • /etc/shadow
    • /etc/password 
    • /etc/shadpaswd 
    • /etc/passwd
  52. What type of information is stored in the /etc/passwd file?

    • User Account information
    • User Password Policy 
    • User Password information 
    • Links to User Account files
  53. Which files define the user’s password aging policy?

    • /etc/login.defs and /etc/default/useradd 
    • /etc/user.defs and /etc/default/useradd
    • /etc/login.defs and /etc/useradd
    • /etc/login.defs and /etc/default/user.defs
  54. Which command makes it possible to ping all the hosts on a given subnet?

    • nmap -a 
    • nmap -sP
    • ping -a
    • ping -A
  55. The two files used by TCP Wrappers to control access are _____: 

    • /etc/hosts_tcp.allow and /etc/hosts_tcp.deny 
    • /xinet.d/hosts.allow and /xinet.d/hosts.deny 
    • /etc/hosts.allow and /etc/hosts.deny 
    • /etc/xinet.d/hosts.allow and /etc/xinet.d/hosts.deny
  56. The /etc/nologin file is used to prevent all users from logging on to the system.

    True or False?

    • True 
    • False
  57. What is the PID of the init process? 

    • 11 
    • 111
    •  1
  58. How is the default run level defined in the /etc/inittab file?

    • initdefault:3
    • runlevel:3:initdefault:
    • id:3: defaultinit:
    • id:3:initdefault:
  59. What does the /etc/init.d directory contain?

    • Scripts for initialization
    • Scripts for network services
    • Scripts for the different run levels
    • Scripts for the default run level
  60. What does the ~/.ssh/id_rsa file contain?

    • RSA public signature of the user 
    • RSA private key of the user 
    • RSA public key of the user 
    • RSA private signature of the user
  61. The _____ command is used to generate SSH keys. 

    • sshgen-key
    • sshkey-gen
    • ssh-genkey
    • ssh-keygen
  62. What is the function of the ssh-agent

    • Decrypt the private key and provide it to client programs 
    • Cache the decrypted private key and provide it to client programs 
    • Generate the signature using the private key 
    • Cache the decrypted public key and provide it to client programs
  63. The ssh-add utility can be used to add only RSA keys.​ True or False?  

    • True
    • False
  64. Which command is used to verify the signature of a package?

    • gpg -V pkg.sig 
    • gpg verify pkg.sig 
    • gpg -v pkg.sig 
    • gpg --verify pkg.sig
  65. The CLI is one of the ways of issuing commands to the operating system. CLI stands for:

    • Common Language Interface 
    • Command Line Interface 
    • Complex Linear Instructions 
    • Current Level Interaction
  66. Which of the following statements is not true regarding X Window:

    • It uses X11 protocol for communication 
    • X Server and X Client are its important components 
    • It specifies how windows and buttons should look 
    • It provides an easy way to interact graphically with the operating system
  67. The ___________ file is used to set the default display manager and desktop environment on RedHat systems.

    • /etc/sysconfig/display 
    • /etc/sysconfig/desktop.conf 
    • /etc/desktop 
    • /etc/sysconfig/desktop
  68. The _____ command is used to do reverse IP address lookups.

    • host 
    • hostname 
    • uname 
    • netstat
  69. Which command’s output will include the ICMP sequence number field?

    • ifconfig
    • traceroute
    • route
    • ping
  70. The kernel’s routing table can be viewed using the commands ______.

    • netstat and traceroute 
    • route and ifconfig 
    • netstat and route
    • netstat and ifconfig
  71. The ____________ package is a meta-package containing the full suite of GNOME applications and components.

    • session-gnome 
    • garden-session 
    • gnome-session 
    • garden-gnome
  72. The ping6 command differs from the ping command how?

    • It can only use hostnames 
    • It requires a fully qualified domain name and the IPv6 address to work 
    • It is only available on Red Hat Linux Distributions 
    • It uses the ICMPv6 Echo_Request protocol
  73. The __________ is the default Desktop Environment on Debian distributions.

    • Gnome 
    • KDE 
    • Xfce 
    • VNC