Final Comprehensive Exam (Ch 1-18) Exam
-
Shell variables are case sensitive.
True or False?
- True
- False
-
Which command can be used to display both local and environment variables?
set
export -p
declare -x
env
-
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 existingPATH
variable - Does nothing, because anything after the
:
is discarded - Replaces the existing directories in the
PATH
with the/home/Alice
directory
- Creates a new
-
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
-
Typical
BASH
exit scripts are found in~/.bash_logout
and __________ files./etc/profile
~/.bash_profile
/etc/bash_logout
/etc/bashrc
-
The
bash script_file
command can be used to directly execute a shell script.True or False?
- True
- False
-
The __________ statement can be used to gather information from the user running the script.
read
for
if
seq
-
In shell scripts, the conditional statement if must always end with:
False condition
elif
then
fi
-
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
-
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
-
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
-
Which of the following applications can be used to read aloud the text from a file?
- Orca
- Espeak
- Emacspeak
- All choices are valid
-
The _________ key setting can prevent the user from accidentally repeating keys if they type too slowly.
- Repeat
- Toggle
- Slow
- Sticky
-
The
/etc/passwd
file can be modified by which of the following?- Group account
- Any user
- Remote user
- Root user
-
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
isx
- The
-
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
-
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
-
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
-
The ___________ command can be used to display group membership for a particular user.
groups
getent
newgrp
showgrp
-
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
-
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
-
Which file is used to set the user’s locale permanently?
~/.profile
~/.forward
~/.lang
~/.login
-
Linux systems keep time in ____.
- UST
- IST
- UTC
- GMT
-
Which command is used to verify time zone changes?
nls
date
systime
sysdate
-
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
-
The ______ mapping method is supported by Unicode.
- Universal Formatting Set
- Universal Character Set (UCS)
- Universal Locale Set (ULS)
- Universal Transformation Set (UTS)
-
SMTP is the standard protocol for communication between email server and mail client.
True or False?
- True
- False
-
The ____________ file is used to configure the
sendmail
daemon./etc/rc.1
/etc/mail/sendmail.cf
/etc/mail.conf
/etc/mail.mail.c
-
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
-
Identify the correct command to view the status of all printers:
lpq -a
lpq -P hpfloor1
lpq
lpr
-
Which is the standard port used for HTTP service?
- 161
- 80
- 25
- 110
-
Which file holds the list of the name servers?
/etc/resolv.conf
/etc/host.conf
/etc/nameservers.conf
/etc/dns.conf
-
Which file is referred to by the Name Service Switch (NSS) resolver?
/etc/hosts
/etc/nssconfig.conf
/etc/resolv.conf
/etc/nsswitch.conf
-
The routing table shows an entry with
genmask 0.0.0.0
, this indicates the _____.- Default Subnet Mask
- Default Name Server
- Default Host
- Default Route
-
Which command is used to setup broadcast addresses for a network interface?
host
route
ifconfig
ip broadcast
-
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
-
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
-
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 thecrontab
file
-
After executing the
atq
command, 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
-
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
-
When the system boots, the system clock is set using the value of the hardware clock.
True or False?
- True
- False
-
The ___________ command is used to update the RTC clock.
clock
net-time
time
hwclock
-
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"
-
The reference time used by NTP is:
- CMOS clock time
- GMT + 0.5
- UTC
- Local time on the primary server
-
The daemon that provides logging services for applications and programs is:
klogd
applog
SNMP
syslogd
-
Which of the following commands is not used to view log files on a Linux operating system?
echo
grep
less
tail
-
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
-
The ____________ command is used to send messages to the system logging facility.
- notice
- timer
- queue
- logger
-
You need to restart the network service and you are not the root user. Which command can you use?
chmod
usermod
chown
sudo
-
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
-
Which file stores the encrypted password?
/etc/shadow
/etc/password
/etc/shadpaswd
/etc/passwd
-
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
-
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
-
Which command makes it possible to
ping
all the hosts on a given subnet?nmap -a
nmap -sP
ping -a
ping -A
-
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
-
The
/etc/nologin
file is used to prevent all users from logging on to the system.True or False?
- True
- False
-
What is the PID of the
init
process?- 11
- 0
- 111
- 1
-
How is the default run level defined in the
/etc/inittab
file?-
initdefault:3
-
runlevel:3:initdefault:
-
id:3: defaultinit:
-
id:3:initdefault:
-
-
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
-
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
-
The _____ command is used to generate SSH keys.
sshgen-key
sshkey-gen
ssh-genkey
ssh-keygen
-
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
-
The
ssh-add
utility can be used to add only RSA keys. True or False?- True
- False
-
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
-
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
-
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
-
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
-
The _____ command is used to do reverse IP address lookups.
host
hostname
uname
netstat
-
Which command’s output will include the ICMP sequence number field?
ifconfig
traceroute
route
ping
-
The kernel’s routing table can be viewed using the commands ______.
netstat
andtraceroute
route
andifconfig
netstat
androute
netstat
andifconfig
-
The ____________ package is a meta-package containing the full suite of GNOME applications and components.
- session-gnome
- garden-session
- gnome-session
- garden-gnome
-
The
ping6
commanddiffers
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
-
The __________ is the default Desktop Environment on Debian distributions.
- Gnome
- KDE
- Xfce
- VNC
Subscribe
0 Comments
Newest