0% found this document useful (0 votes)
85 views14 pages

Linux 9-16 Exams

The document contains exam questions and answers related to Linux commands, files, and system configuration. Some of the key topics covered include the echo, nano, and read commands, shell scripting with variables and conditionals, disk partitioning, package management with RPM, user management, file permissions, and directory structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views14 pages

Linux 9-16 Exams

The document contains exam questions and answers related to Linux commands, files, and system configuration. Some of the key topics covered include the echo, nano, and read commands, shell scripting with variables and conditionals, disk partitioning, package management with RPM, user management, file permissions, and directory structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Exam 9

CORRECT- See Section 9.2


The echo command:

 ✔ Used to output text to the console.

CORRECT- See Section 9.2


A file starts with #!/bin/csh. This means:

 ✔ Execution of the script will invoke /bin/csh to interpret the


rest of the file.

CORRECT- See Section 9.3


Most nano commands take the form of:

 ✔ Control and other character

CORRECT- See Section 9.4.2


What does this shell script do? FOO=/tmp/foo if [ ! -d $FOO ];
then mkdir $FOO fi

 ✔ Create /tmp/foo if it does not exist.

CORRECT- See Section 9.4.1


Given the following part of the script: if [ -f $1 ]; then echo "I am
here" fi What is the meaning of $1?

 ✔ This is the first argument passed to the script.

CORRECT- See Section 9.4.1


Given the following command sequence running through
./test.sh hello goodbye: if [ -f $2 ]; then echo "I am here" fi When
will "I am here" be printed?
 ✔ If a file named "goodbye" exists in the current directory.

CORRECT- See Section 9.4.1


What is the correct way to assign the word "Hello" to a
variable?

 ✔ A="Hello"

CORRECT- See Section 9.4.1


What is the correct way to save the current directory to a
variable?

 ✔ A=`pwd`.

CORRECT- See Section 9.4.1


Which shell command accepts user keyboard input?

 ✔ read

CORRECT- See Section 9.4.1


What information is contained in $? ?

 ✔ The output code of the above command.

Exam 10

CORRECT- See Section 10.2


A CPU flag...

 ✔...defines the features supported by the CPU.

CORRECT- See Section 10.2


64 bit platforms can access more memory than 32 bit platforms.
True or false?
 ✔ True

CORRECT- See Section 10.3


Which command displays SMBIOS information?

 ✔ dmidecode

CORRECT- See Section 10.5


A partition of a hard disk drive can be referred to as a/an _______.

 ✔ partition

CORRECT- See Section 10.5


The fdisk command is a tool used to work with disks with an
MBR partition. True or false?

 ✔ True

CORRECT- See Section 10.5


Which of the following is the valid device file name for the first
IDE hard disk in the system?

 ✔/dev/hda

Exam 11

CORRECT- See Section 11.2.2


What does the acronym RPM stand for?

 RPM Package Management

CORRECT- See Section 11.2


One way to install new software on a Linux system is to use a
package management system. True or false?
 ✔ True

CORRECT- See Section 11.9


When you run the dmesg command, the system displays the
messages that are generated by the kernel. True or false?

 ✔ True

CORRECT- See Section 11.3


The /proc directory contains a subdirectory for each process
present on the system. True or false?

 ✔ True

CORRECT- See Section 11.3


The process identifier (PID) of the init process is

 ✔ 1

CORRECT- See Section 11.7


The free command displays statistics about:

 ✔ Memory usage.

CORRECT- See Section 11.5


The process (ps) command displays only the processes running
in the current shell by default. True or false?

 ✔ True

CORRECT- See Section 11.8


Which directory normally contains the log files?

 ✔/var/log
CORRECT- See Section 11.8
Which log file contains the messages regarding authentication
and authorization?

 ✔ secure

CORRECT- See Section 11.8


All log files contain text data only. True or false?

 ✔ False

Exam 12

CORRECT- See Section 12.2


Which of the following would be considered a host?

 ✔ A printer connected to the network via an IP address.

CORRECT- See Section 12.2


A service is ...

 ✔...a feature provided by one computer to another.

CORRECT- See Section 12.3


Only servers have host names. True or false?

 ✔ False

CORRECT- See Section 12.3


Which of the following protocols defines how network
communication works?
 ✔ TCP/IP

CORRECT- See Section 12.6.1


The name of the network devices with primary cables is ether0.
True or false?

 ✔ False

CORRECT- See Section 12.6.1


Which of the following commands will display the ID address of
your machine?

 ✔ ifconfig

WRONG- See Section 12.6.7


Which of the following commands will allow you to log in to a
remote machine?

 ✗ route

CORRECT- See Section 12.6.4


Which netstat command option contains information displayed
as numbers instead of names?

 ✔-n

CORRECT- See Section 12.6.7


Which of the following commands will allow you to log in to the
server1 machine with the account name nick?

 ✔ ssh nick@server1

WRONG- See Section 12.6.7.1


The RSA fingerprint key allows the dig command to connect to
remote systems. True or false?

 ✗ True

Exam 13

CORRECT- See Section 13.2.2


Which of the users can see the /etc/shadow file?

 ✔ The root user

CORRECT- See Section 13.2.4


Which command will display the UIDs, GIDs and groups to
which your current user belongs?

 ✔ id

CORRECT- See Section 13.1


Each user belongs to at least one group. True or false?

 ✔ True

CORRECT- See Section 13.7


Which command will be displayed to users who are logged into
the system?

 ✔ who

CORRECT- See Section 13.6.1


The sudo command enables regular users to...

 ✔...execute certain commands as the root user.

CORRECT- See Section 13.6.1


The /etc/sudoers file must be edited directly by root with the
visudo command. True or false?

 ✔ True

CORRECT- See Section 13.6.1


Which default editor does the visudo command use?

 ✔ vi

CORRECT- See Section 13.2.4


Which of the following commands will show the group(s) to
which the user belongs?

 ✔ id

CORRECT- See Section 13.3.1


What structure does the /etc/group file follow?

 ✔ group_name:password_placeholder:GID:user_list

CORRECT- See Section 13.3.1


A GID is associated with a group name. True or false?

 ✔ True

Exam 14

CORRECT- See Section 14.7.1


For what type of users are UIDs 1-500 generally reserved?

 ✔ System accounts, such as server processes.

CORRECT- See Section 14.12


If a user is deleted, the files and directories that the user
belongs...
 ✔...it will display a UID as an owner, but not the username.

CORRECT- See Section 14.7.1


Which of the following options for the useradd command allows
the root to specify the UID to be associated with the account?

 ✔-u

CORRECT- See Section 14.7.1


Which of the following options for the useradd command allows
the root to specify the supplementary groups, of which the user
will be a member?

 ✔-G

CORRECT- See Section 14.7.1


On a system that does not use UPG, the useradd command will
also create a user group. For example, user bob, group bob.
True or false?

 ✔ False

CORRECT- See Section 14.7.1


The useradd command will create a home directory by default
for a user. True or false?

 ✔ True

CORRECT- See Section 14.11.1


The usermod command can be used to do all of the following,
except ...

 ✔...change the user's MAX and MIN password settings.

CORRECT- See Section 14.11.1


Which of the following commands will add the extra group to
user bob's groups in addition to bob's current secondary
groups?

 ✔ usermod -aG extra bob

CORRECT- See Section 14.9


For non-root users, the passwd command can only be used to
change the password of the user executing the command. True
or false?

 ✔ True

CORRECT- See Section 14.12


The userdel command ...

 ✔...will delete the user account, but leaves the user's files by
default.

Exam 15

CORRECT- See Section 15.6.2


Which of the following commands sets the "other" permissions
for the file to r-x?

 ✔ chmod o=rx file

CORRECT- See Section 15.6.3


Which of the following commands sets the "other" permissions
for the file to r-x?

 ✔ chmod 775 file

CORRECT- See Section 15.6.2


Only one set (user, group, other) of permissions can be changed
at a time using the symbolic method. True or false?

 ✔ False

CORRECT- See Section 15.5


The chown command can be used to change the owner and
group of a file. True or false?

 ✔ True

CORRECT- See Section 15.6


The sysadmin user will be able to read the file because he is its
owner. ----r--r-- 1 sysadmin group 38270 Sep 2 18:49 file True or
false?

 ✔ False

CORRECT- See Section 15.6.2


The sysadmin user will be able to change the permissions of the
file because he is its owner. ----r--r-- 1 sysadmin group 38270 Sep
2 18:49 file True or false?

 ✔ True

CORRECT- See Section 15.6.3


The octal notation uses the following values for permissions
granted:

 ✔ r = 4, w = 2, x = 1

CORRECT- See Section 15.6


Which of the following permissions would allow all users to
add, view and delete files in a directory?
 ✔ 777

CORRECT- See Section 15.6


A user cannot delete a file if he is not its owner. True or false?

 ✔ False

CORRECT- See Section 15.6


The "execute" permission on a file allows you to:

 ✔ Execute the file as a script.


Exam 16

CORRECT- See Section 16.8


The /tmp directory is a temporary directory and will not exist on
a system at all times. True or false?

 ✔ False

CORRECT- See Section 16.8


The /var directory has files that change over time. True or false?

 ✔ True

CORRECT- See Section 16.6


The "sticky bit" permission...

 ✔...others cannot delete the files of those who do not own a


common directory.

CORRECT- See Section 16.6


Which of the following commands will set "sticky bit" in the
/shared directory ?
 ✔ chmod 1777 /shared

CORRECT- See Section 16.2


The "setuid" permission...

 ✔...allows a command to be executed as the owner of the


file.

CORRECT- See Section 16.2


Which of the following commands will set setuid in the
/usr/bin/program directory?

 ✔ chmod 4755 /usr/bin/program

CORRECT- See Section 16.5


Which of the following commands will set setgid in the /shared
directory ?

 ✔ chmod 2777 /shared

CORRECT- See Section 16.7.3


Deleting a source file will break an associated physical link.
True or false?

 ✔ False

CORRECT- See Section 16.7.3


An origin and a physical link must be part of the same file
system. True or false?

 ✔ True

CORRECT- See Section 16.7.3


Deleting a source file will break an associated symbolic link.
True or false?

 ✔ True

You might also like