There are seven fields in the /etc/passwd file. Which
of the following lists all the fields in the correct
a. username, UID, GID, home directory, command, comment
b. username, UID, GID, comment, home directory, command
c. UID, username, GID, home directory, comment, command
d. username, UID, group name, GID, home directory,
The seven fields required for each line in the /etc/passwd
file are username, UID, GID, comment, home directory,
command. Each of these fields must be separated by a
colon even if they are empty.
Which of the following commands will show a list of the
files in your home directory including hidden files and
the contents of all subdirectories?
a. ls -c home
b. ls -aR /home/username
c. ls -aF /home/username
d. ls -l /home/username
The ls command is used to display a listing of files.
The -a option will cause hidden files to be displayed as
well. The -R option causes ls to recurse down the
directory tree. All of this starts at your home
In order to prevent a user from logging in, you can add
a(n) ________at the beginning of the password field.
If you add an asterick at the beginning of the password
field in the /etc/passwd file, that user will not be
able to log in.
You have a directory called /home/ben/memos and want to
move it to /home/bob/memos so you issue the command mv
/home/ben/memos /home/bob. What is the results of this
a. The files contained in /home/ben/memos are moved to
the directory /home/bob/memos/memos.
b. The files contained in /home/ben/memos are moved to
the directory /home/bob/memos.
c. The files contained in /home/ben/memos are moved to
the directory /home/bob/.
d. The command fails since a directory called memos
already exists in the target directory.
When using the mv command to move a directory, if a
directory of the same name exists then a subdirectory is
created for the files to be moved.
Which of the following tasks is not necessary when
creating a new user by editing the /etc/passwd file?
a. Create a link from the user's home directory to the
shell the user will use.
b. Create the user's home directory
c. Use the passwd command to assign a password to the
d. Add the user to the specified group.
There is no need to link the user's home directory to
the shell command. Rather, the specified shell must be
present on your system.
You issue the following command useradd -m bobm But the
user cannot logon. What is the problem?
a. You need to assign a password to bobm's account using
the passwd command.
b. You need to create bobm's home directory and set the
c. You need to edit the /etc/passwd file and assign a
shell for bobm's account.
d. The username must be at least five characters long.
The useradd command does not assign a password to newly
created accounts. You will still need to use the passwd
command to assign a password.
You wish to print the file vacations with 60 lines to a
page. Which of the following commands will accomplish
this? Choose one:
a. pr -l60 vacations | lpr
b. pr -f vacations | lpr
c. pr -m vacations | lpr
d. pr -l vacations | lpr
The default page length when using pr is 66 lines. The
-l option is used to specify a different length.
Which file defines all users on your system?
The /etc/passwd file contains all the information on
users who may log into your system. If a user account is
not contained in this file, then the user cannot log in.
Which two commands can you use to delete directories?
B) rm -rf
E) rd -rf
Answer(s): B, C - You can use rmdir or rm -rf to delete
a directory. Answer a is incorrect, because the rm
command without any specific flags will not delete a
directory, it will only delete files. Answers d and e
point to a non-existent command.
Which partitioning tool is available in all
A) Disk Druid
C) Partition Magic
E) System Commander
Answer(s): B - The fdisk partitioning tool is available
in all Linux distributions. Answers a, c, and e all
handle partitioning, but do not come with all
distributions. Disk Druid is made by Red Hat and used in
its distribution along with some derivatives. Partition
Magic and System Commander are tools made by third-party
companies. Answer d is not a tool, but a file system
type. Specifically, FAT32 is the file system type used
in Windows 98.
Which partitions might you create on the mail server's
hard drive(s) other than the root, swap, and boot
[Choose all correct answers]
Answer(s): A, B, E - Separating /var/spool onto its own
partition helps to ensure that if something goes wrong
with the mail server or spool, the output cannot overrun
the file system. Putting /tmp on its own partition
prevents either software or user items in the /tmp
directory from overrunning the file system. Placing
/home off on its own is mostly useful for system
re-installs or upgrades, allowing you to not have to
wipe the /home hierarchy along with other areas. Answers
c and d are not possible, as the /proc portion of the
file system is virtual-held in RAM-not placed on the
hard drives, and the /bin hierarchy is necessary for
basic system functionality and, therefore, not one that
you can place on a different partition.
When planning your backup strategy you need to consider
how often you will perform a backup, how much time the
backup takes and what media you will use. What other
factor must you consider when planning your backup
what to backup
Choosing which files to backup is the first step in
planning your backup strategy.
What utility can you use to automate rotation of logs?
The logrotate command can be used to automate the
rotation of various logs.
In order to display the last five commands you have
entered using the history command, you would type
Answer: history 5
The history command displays the commands you have
previously entered. By passing it an argument of 5, only
the last five commands will be displayed.
What command can you use to review boot messages?
The dmesg command displays the system messages contained
in the kernel ring buffer. By using this command
immediately after booting your computer, you will see
the boot messages.
What is the minimum number of partitions you need to
Linux can be installed on two partitions, one as / which
will contain all files and a swap partition.
What is the name and path of the main system log?
By default, the main system log is /var/log/messages.
Of the following technologies, which is considered a
listed. Java and C++ are complete programming languages.
Active Server Pages are parsed on the server with the
results being sent to the client in HTML
Page Numbers : 1