LPI Linux Essentials - Exam 010, (version 1.6) 010-160 Exam Questions

Page: 1 / 14
Total 81 questions
Question 1

What is the UID of the user root?



Answer : E

The UID of the user root is always 0 on Linux systems. This is because the kernel uses the UID 0 to check for the superuser privileges and grant access to all system resources. The name of the user account with UID 0 is usually root, but it can be changed or have aliases. However, some applications may expect the name root and not work properly with a different name. The UID 0 is reserved for the root user and cannot be assigned to any other user. The UID 0 is stored in the /etc/passwd file along with other user information.Reference:

Linux Essentials Topic 104: The Linux Operating System, section 104.4: Runlevels and Boot Targets.

Linux Essentials Topic 106: Security and File Permissions, section 106.1: Basic security and identifying user types.

Linux Essentials Topic 106: Security and File Permissions, section 106.2: Creating users and groups.


Question 2

Which one of the following statements concerning Linux passwords is true?



Answer : D

Linux passwords are not stored in plain text, but in a scrambled or encrypted form known as a hash. A hash is a one-way function that transforms a string of characters into a fixed-length value. The same input always produces the same hash, but it is impossible to reverse the process and recover the original input from the hash. This way, the system can verify the user's password without exposing it to anyone who can read the file where the hashes are stored. The file that contains the password hashes is /etc/shadow, which is only readable by the root user or members of the shadow group. The passwd utility is used to change the user's password, which updates the hash in the /etc/shadow file.Reference:Linux Essentials 1.6 Topic 105: Security and File Permissions,How to Change Account Passwords on Linux,Where is my password stored on Linux?


Question 3

Which of the following commands adds the directory /new/dir/ to the PATH environment variable?



Answer : C

The PATH environment variable is a colon-separated list of directories that the shell searches for commands. To add a new directory to the PATH, you need to append it to the existing value of the variable, using the syntaxPATH=new/dir:PATH. However, this only changes the PATH for the current shell session. To make the change permanent, you need to use the export command, which makes the variable available to all child processes of the shell. The export command takes the name of the variable as an argument, without the dollar sign ($). Therefore, the correct command to add /new/dir/ to the PATH and export it isexport PATH=/new/dir:PATH.Reference:

Linux Essentials - Linux Professional Institute (LPI)

How to set the path and environment variables in Windows - Computer Hope


Question 4

What happens to a file residing outside the home directory when the file owner's account is deleted? (Choose two.)



Answer : C, E

When a user account is deleted, the files owned by that user are not automatically deleted from the file system, unless they are in the user's home directory. The files residing outside the home directory will remain unchanged, but they will have an invalid owner. The owner of a file is identified by a numeric user ID (UID), which is mapped to a user name by the /etc/passwd file. When a user is deleted, the corresponding entry in the /etc/passwd file is removed, but the UID of the file is not changed. Therefore, when listing the file's details, the UID of the former owner is shown instead of the user name. For example, if the user alice with UID 1001 is deleted, and she owns a file named report.txt in the /tmp directory, the output of ls -l /tmp/report.txt will look something like this:

-rw-r--r-- 1 1001 users 1024 Nov 20 14:11 /tmp/report.txt

The user root is not set as the new owner of the file, nor is the file moved to /lost+found or removed from the file system. The /lost+found directory is used to store files that are recovered from a corrupted file system after running the fsck command, not from deleted user accounts. The file system check does not affect the ownership or permissions of the files, unless there is a serious inconsistency that needs to be fixed.Reference:

Linux Essentials - Linux Professional Institute (LPI), section 5.2.1

5.2 Lesson 1 - Linux Professional Institute Certification Programs, slide 6.


Question 5

Which command copies the contents of the directory /etc/, including all sub-directories, to /root/?



Answer : B

The correct command to copy the contents of the directory /etc/, including all sub-directories, to /root/ iscp -r /etc/* /root. This command uses the cp command, which stands for copy, and is used to copy files and directories on Linux and Unix systems.The command also uses the following options and arguments123:

The -r option, which stands for recursive, and tells cp to copy all files and sub-directories of the source directory. Alternatively, the -R option can be used, which has the same effect as -r.

The /etc/* argument, which specifies the source directory and all its contents. The asterisk (*) is a wildcard character that matches any file or directory name. This argument tells cp to copy everything inside the /etc/ directory, but not the directory itself.

The /root argument, which specifies the destination directory. This argument tells cp to copy the source files and sub-directories to the /root/ directory.

The other options are incorrect because they use different commands or syntax that do not copy the contents of the directory /etc/, including all sub-directories, to /root/. For example:

Option A uses the copy command, which is not a valid Linux command. The correct command is cp.

Option C uses the -v option, which stands for verbose, and tells cp to print verbose output. This option does not affect the copying process, but only the output. It also does not include the -r or -R option, which is necessary to copy the sub-directories.

Option D uses the rcp command, which stands for remote copy, and is used to copy files between different hosts on a network. This command is not relevant for copying files on the same host.

Option E uses the -R option, which is correct, but also uses the.argument, which is incorrect. The dot (.) is a special character that matches any single character. This argument tells cp to copy only the files and directories that have a dot in their name, which may exclude some files and directories that do not have a dot.


Question 6

Which of the following programs are web servers? (Choose two.)



Answer : A, E

A web server is a program that listens for requests from web browsers and serves web pages, images, or other resources. Apache HTTPD and NGINX are two popular web servers that can run on Linux systems. They can handle multiple protocols, such as HTTP, HTTPS, FTP, and SMTP. Postfix, Curl, and Dovecot are not web servers, but they are related to web or network services. Postfix is a mail transfer agent (MTA) that can send and receive emails. Curl is a command-line tool that can transfer data from or to a web server. Dovecot is a mail delivery agent (MDA) that can store and retrieve emails from a local mailbox.Reference:

Linux Essentials - Linux Professional Institute (LPI), section 1.2 Major Open Source Applications

LPI Linux Essentials 010-160 - Testprep Training Tutorials, section 4.4 Your Computer on the Network


Question 7

Which of the following permissions are set on the /tmp/ directory?



Answer : A

The correct permissions for the /tmp directory are rwxrwxrwt, which means that the owner, group, and others have read, write, and execute permissions, and that the sticky bit is set. The sticky bit is a special permission that prevents users from deleting or renaming files that they do not own in a shared directory. The /tmp directory is used for storing temporary files that may be created by different users and processes, so it needs to be accessible and writable by all, but also protected from unauthorized deletion or modification of files. The rwxrwxrwt permissions can be set by using the chmod command with either the octal mode 1777 or the symbolic mode a+trwx.Reference: : [File system permissions] : [Sticky bit] : [chmod]


Page:    1 / 14   
Total 81 questions