Midterm Exam (Ch 1-8) Exam
-
Which of the following is a valid variable assignment?
MY VAR= “set to one”
alpha-init=5
2=xyz
APP_VAR=’zero’
-
Which of the following is not a valid variable name?
VAR_1
NEWVARIABLE
_LPIC
2_VAR
-
The ___________ command is used to display the value of a specific variable.
value
set
var
echo
-
The PATH variable directories are searched __________ when executing a command.
- Including only the first 256 characters
- In no particular order
- Right to left
- Left to right
-
Which of the following switches will include the full path in the prompt?
\W
\w
\e
\H
-
Which of the following is not a purpose for creating an alias?
- To make commands run faster
- To create DOS-like commands
- To include a command option by default
- To create a short nickname for a long command or series of commands
-
Which script is executed when you exit the shell?
~/.bash_logout
/etc/bashrc
~/.bashrc
~/.bash_profile
-
The
bash script_file
command can be used to directly execute a shell script.True or False?
- True
- False
-
An ideal place for a regular user (not a super user), to place their shell scripts would be:
/sbin
/usr/local/sbin
/bin
/home/james/bin
-
When will the condition
test -n STRING
be true?- If the length of
STRING
is nonzero - If the length of
STRING
is zero - Always
- Never
- If the length of
-
The return status from a command is
1
. What does this indicate?- Command executed successfully
- Calculation done by the command yields the result 1
- Command is still running in the background
- Command did not execute successfully
-
The statement
if [ -d file ]
will be true, if the file:- Is executable
- Is a directory
- Is writable
- Exists
-
Accessibility within a GUI environment can be improved by which of the following?
- Text-to-speech screen reader
- Automatic clicking
- Screen magnifier
- All choices are valid
-
Which of the following shortcuts will enable/disable Sticky Keys?
- Pressing the Enter key three times
- Pressing the Alt key three times
- Pressing the Shift key five times
- Pressing the F3 function key five times
-
Visual cues like, flashing of window title bar on the complete screen, can be set using __________ keys feature.
- Sticky
- Toggle
- Repeat
- Slow
-
A normal (non root) user has which type of access to the
/etc/passwd
file?- Write only
- Read only
- Execute, read, and write
- Read and write
-
The ________ command can be used to display user information, including information from the GECOS field.
passwd
chage
finger
usermod
-
Which of the following information is not stored in the
/etc/shadow
file?- Encrypted password
- Maximum number of days remaining for the password to expire
- Default home directory
- Days since last password change
-
Password aging policy for individual users can be set using the ________ command.
(choose two)
grep
usermod
getent
passwd
chage
-
A Linux administrator modifies the values of
UID_MAX
andUID_MIN
parameters in the/etc/login.defs
file. This in effect will allow her to:- Change password expiration policy for existing users
- Assign UID within the specified range for new users
- Assign UID and GID within the specified range for all users
- Assign GID within the specified range for new users
-
The ___________ command can be used to display group membership for a particular user.
showgrp
getent
groups
newgrp
-
Root user can change password for any user using ________ command.
passwdmod
change
passwd
usermod
-
Using the command
passwd -e test_user
, the root user can force a password change in the next login attempt.True or False?
- True
- False
-
The
chage
command cannot be used to:- Delete a user
- View password aging policies
- Enforce a password changing and expiry policy for specific user accounts
- Update information related to password expiry
-
Which of the following parameters is not referred by locale?
- Character classification
- Digital signatures
- Monetary symbols
- Numeric representation
-
Which command is used to list all available locales on the system?
locale -l
locale -A
locale -a
locale
-
Linux systems keep time in ____.
- UTC
- IST
- GMT
- UST
-
Which environment variable is used to find the time zone?
TIME
TZ
TZONE
SYSTIME
-
What does UTF-8 mean?
- UCS Technology Format
- UCS Transformation Format
- UCS Transcoding Format
- UCS Transfer Format
-
The daemon associated with the
cron
utility is called the ___________ daemon.crond
crondaemon
cdaemon
cron
-
Which of the following commands can be used to view the current contents of a crontab file?
crontab -l
crontab -r
crontab -p
crontab -v
-
How would you schedule a
cron
job to run every second?- By putting an entry similar to
* * * * * <job>
- Using a
cron
job, it is not possible to schedule a job which runs every second - Create 60 jobs which run every minute
- By using the keyphrase
@second
- By putting an entry similar to
-
A one-time job needs to be scheduled for a specific time. Which of the following commands is most suitable for the task?
batch
cron
systemctl
at
-
The
at.allow
andat.deny
files can be used to control access to:- The
at
command only - The
at
and thebatch
commands - The
crontab
command - All programs used for scheduling
- The
-
The
batch
commands are executed only when the system’s load average drops below which of the following by default?- 0.5
- 0.2
- 0.8
- 1.0
-
X Windows, the latest GUI server for Linux, is a desktop from Microsoft.
True or False?
- True
- False
-
Which of the following is not a component of the X Window system:
- Widget/toolkit libraries
- Hardware drivers
- Network manager
- Display manager
-
If no desktop environment is installed, which of the following display managers is likely to be used?
lightdm
kdm
xdm
gdm
-
In order for the installed display manager to start automatically during the boot process, the default runlevel for Debian-derived distributions should be:
- Any level
- Between
2
and5
- Less than 2
- More than 3
-
In the Screen section of the
/etc/X11/xorg.conf
file, theDefaultDepth
is set to 16. This means:- 65536 colors can be displayed
- 512 colors can be displayed
- 16 colors can be displayed
- 256 colors can be displayed
Subscribe
0 Comments
Newest