Linux+ Networking Chapter 5

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Ajeff
A
Ajeff
Community Contributor
Quizzes Created: 39 | Total Attempts: 53,533
Questions: 19 | Attempts: 1,054

SettingsSettingsSettings
Linux Plus Networking Quizzes & Trivia

Linux+ Networking Chapter 5


Questions and Answers
  • 1. 

    A symbolic link is also known as a soft link and is depicted by an @ appearing at the beginning of the filename when viewed using the ls –l command. True or False?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    A symbolic link is also known as a soft link, but it is not depicted by an @ appearing at the beginning of the filename when viewed using the ls –l command.

    Rate this question:

  • 2. 

    There is no real difference between the “S” and “s” special permissions when displayed using the ls –l command. One just means it is on a file and the other that it is on a directory. True or False?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    False. The "S" and "s" special permissions do have a difference when displayed using the ls -l command. The lowercase "s" indicates that the setgid permission is set on a directory, while the uppercase "S" indicates that the setgid permission is not set on a file, but the execute permission is set.

    Rate this question:

  • 3. 

    The default permissions given by the system prior to analyzing the umask are ___________for directories, and __________ for files.

    • A.

      Rw-rw-rw- and rw-rw-rw-

    • B.

      Rw-rw-rw- and r--r--r--

    • C.

      Rw-rw-rw- and rwxrwxrwx

    • D.

      Rwxrwxrwx and rw-rw-rw-

    • E.

      Rwxrw-rw- and rwx-rw-rw-

    Correct Answer
    D. Rwxrwxrwx and rw-rw-rw-
    Explanation
    The default permissions given by the system prior to analyzing the umask are "rwxrwxrwx" for directories and "rw-rw-rw-" for files.

    Rate this question:

  • 4. 

    What must a user do to run cp or mv interactively and be asked if she wants to overwrite an existing file?

    • A.

      There is no choice as the new file will overwrite the old one by default.

    • B.

      Type interactive cp or interactive mv.

    • C.

      Type cp -i or mv -i.

    • D.

      Type cp --interactive or mv --interactive.

    • E.

      Just type cp or mv as they run in interactive mode by default.

    Correct Answer
    E. Just type cp or mv as they run in interactive mode by default.
    Explanation
    The correct answer is "Just type cp or mv as they run in interactive mode by default." This means that when the user runs the cp or mv command, they will be prompted to confirm if they want to overwrite an existing file.

    Rate this question:

  • 5. 

    A user utilizes the chgrp command to give ownership of a file to another user. What must the user do to regain ownership of the file?

    • A.

      Run chgrp again listing himself as the new owner.

    • B.

      Nothing as this is a one-way, one-time action.

    • C.

      Have the new owner run chgrp and list the original owner as the new owner.

    • D.

      Run chown and list himself as the new owner.

    Correct Answer
    C. Have the new owner run chgrp and list the original owner as the new owner.
  • 6. 

    After typing the ls –F command, you see the following line in the output:  -rw-r-xr--    1 user1    root        0 Apr 29 15:40 file1  What does this mean?

    • A.

      User1 has read and write, members of the root group have read and execute, and all others have read permissions to the file.

    • B.

      Members of the root group have read and write, user1 has read and execute, and all others have read permissions to the file.

    • C.

      All users have read and write, members of the root group have read and execute, and user1 has read permissions to the file.

    • D.

      User1 has read and write, all others have read and execute, and members of the root group have read permissions to the file.

    Correct Answer
    A. User1 has read and write, members of the root group have read and execute, and all others have read permissions to the file.
    Explanation
    The output line "-rw-r-xr-- 1 user1 root 0 Apr 29 15:40 file1" represents the file permissions. The first character "-" indicates that it is a regular file. The next three characters "rw-" indicate that the owner, user1, has read and write permissions. The next three characters "r-x" indicate that the members of the root group have read and execute permissions. The last three characters "r--" indicate that all others have read permissions. Therefore, the correct answer is that user1 has read and write, members of the root group have read and execute, and all others have read permissions to the file.

    Rate this question:

  • 7. 

    After typing the command umask 731, the permissions on all subsequently created files and directories will be effected. In this case, what will the permissions on all new files be?

    • A.

      Rw-rw-rw-

    • B.

      Rwxrw-r--

    • C.

      ---r--rw-

    • D.

      ----wx--x

    Correct Answer
    C. ---r--rw-
    Explanation
    After typing the command umask 731, the umask value will be applied to the default permissions of all subsequently created files and directories. The umask value is subtracted from the default permissions to determine the final permissions. In this case, the umask value is 731, which means that the permissions for the group and others will be affected. The default permissions are rw-rw-rw-, and subtracting 731 from it results in ---r--rw-. Therefore, the permissions on all new files will be ---r--rw-.

    Rate this question:

  • 8. 

    When you change the data in a file that is hard-linked to three others, __________.

    • A.

      Only the data in the file you modified is affected.

    • B.

      Only the data in the file you modified and any hard linked files in the same directory are affected.

    • C.

      The data in the file you modified and the data in all hard linked files are modified as they have different inodes.

    • D.

      The data in the file you modified as well as the data in all hard linked files are modified as they share the same data and all have the same inode and file size.

    Correct Answer
    D. The data in the file you modified as well as the data in all hard linked files are modified as they share the same data and all have the same inode and file size.
    Explanation
    When you change the data in a file that is hard-linked to three others, the data in the file you modified as well as the data in all hard-linked files are modified. This is because hard links are essentially multiple names for the same file, sharing the same data and inode. Therefore, any changes made to the file will be reflected in all the hard-linked files since they all point to the same underlying data.

    Rate this question:

  • 9. 

    The command chmod 317 file1 would produce which of the following lines in the ls command?

    • A.

      --w-r--rwx 1 user1 root 0 Apr 29 15:40 file1

    • B.

      --wx--xrwx 1 user1 root 0 Apr 29 15:40 file1

    • C.

      -rwxrw-r-x 1 user1 root 0 Apr 29 15:40 file1

    • D.

      --w-rw-r-e 1 user1 root 0 Apr 29 15:40 file1

    Correct Answer
    B. --wx--xrwx 1 user1 root 0 Apr 29 15:40 file1
  • 10. 

    Which of the following commands will change the user ownership and group ownership of file1 to user1 and root respectively?

    • A.

      Chown user1:root file1

    • B.

      Chown user1 : root file1

    • C.

      This cannot be done because user and group ownership properties of a file must be modified separately.

    • D.

      Chown root:user1file1

    • E.

      Chown root : user1file1

    Correct Answer
    A. Chown user1:root file1
    Explanation
    The correct answer is "chown user1:root file1". This command will change the user ownership of "file1" to "user1" and the group ownership to "root".

    Rate this question:

  • 11. 

    What does the /var directory contain?

    • A.

      Various additional programs

    • B.

      Spools and log files

    • C.

      Temporary files

    • D.

      Files that are architecture independant

    • E.

      Local variance devices

    Correct Answer
    B. Spools and log files
    Explanation
    The /var directory contains spools and log files. Spools are temporary storage areas where data is held before being processed or printed. Log files record events and activities on the system, providing a history of actions and errors for troubleshooting purposes. These files are typically found in the /var directory to keep them separate from other system files and to allow for easy management and access.

    Rate this question:

  • 12. 

    What does the mv command do? (Choose all that apply.)

    • A.

      It makes a volume.

    • B.

      It makes a directory.

    • C.

      It moves a directory.

    • D.

      It moves a file.

    Correct Answer(s)
    C. It moves a directory.
    D. It moves a file.
    Explanation
    The mv command is used to move files or directories from one location to another. It can be used to move both directories and files. Therefore, the correct answers are "It moves a directory" and "It moves a file."

    Rate this question:

  • 13. 

    A file has the following permissions r----x-w-. The command chmod 143 would have the same effect as the command  _______________. (Choose all that apply.)

    • A.

      Chmod u+x-r,g+r-x,o+w file1

    • B.

      Chmod u=w,g=rw,o=rx file1

    • C.

      Chmod u-r-w,g+r-w,o+r-x file1

    • D.

      Chmod u=x,g=r,o=wx file1

    • E.

      Chmod u+w,g+r-w,o+r-x file1

    Correct Answer
    D. Chmod u=x,g=r,o=wx file1
    Explanation
    The given file has the permissions r----x-w-. The command chmod 143 would have the same effect as the command chmod u=x,g=r,o=wx file1 because it sets the permissions for the user to execute, for the group to read, and for others to write and execute.

    Rate this question:

  • 14. 

    1. The which command _________________?

    • A.

      Can only be used to search for executables

    • B.

      Searches for a file in all directories starting from the root

    • C.

      Is not a valid Linux command

    • D.

      Searches for a file only in directories that are in the PATH variable

    Correct Answer
    D. Searches for a file only in directories that are in the PATH variable
    Explanation
    The "which" command is used to search for the location of a command or executable file in the directories listed in the PATH variable. It does not search for files in all directories starting from the root, nor is it limited to searching for executables only. Therefore, the correct answer is that "which" searches for a file only in directories that are in the PATH variable.

    Rate this question:

  • 15. 

    Hard links need to reside on the same filesystem as the target, whereas symbolic links need not be on the same filesystem as the target. True or False?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    Explanation
    Hard links are file system links that point directly to the target file. They are essentially the same file with multiple names. Hard links must reside on the same file system as the target because they reference the target's physical location on the disk. On the other hand, symbolic links are file system links that point to the target file by its path. Symbolic links can be created on different file systems as they do not reference the target's physical location. Therefore, the statement "Hard links need to reside on the same filesystem as the target, whereas symbolic links need not be on the same filesystem as the target" is true.

    Rate this question:

  • 16. 

    When applied to a directory, the SGID special permission____________________.

    • A.

      Causes all new files created in the directory to have the same group membership as the directory and not the entity that created them

    • B.

      Cannot be done as it is only applied to files

    • C.

      Allows users the ability to use more than two groups for files that they create within the directory

    • D.

      Causes users to have their permissions checked before they are allowed to access files in the directory

    Correct Answer
    A. Causes all new files created in the directory to have the same group membership as the directory and not the entity that created them
    Explanation
    The SGID special permission, when applied to a directory, ensures that any new files created within that directory will inherit the same group membership as the directory itself. This means that the group ownership of the directory will be applied to the new files, rather than the group ownership of the user who created them. This can be useful in situations where multiple users need to collaborate on files within a shared directory, as it allows for consistent group ownership and access permissions.

    Rate this question:

  • 17. 

    Which command do you use to rename files and directories?

    • A.

      Cp

    • B.

      Mv

    • C.

      Rn

    • D.

      Rename

    Correct Answer
    B. Mv
    Explanation
    The correct answer is "mv". The "mv" command is used to rename files and directories in a Unix or Linux operating system. By using this command, you can change the name of a file or directory to a new name of your choice. It is a versatile command that can also be used to move files and directories to different locations in the file system.

    Rate this question:

  • 18. 

    What are the three standard Linux permissions?

    • A.

      Full control, read-execute, write

    • B.

      Read, write, modify

    • C.

      Execute, read, write

    • D.

      Read, write, examine

    Correct Answer
    C. Execute, read, write
    Explanation
    The three standard Linux permissions are execute, read, and write. These permissions determine the level of access a user has to a file or directory. The execute permission allows a user to run a file or access a directory. The read permission allows a user to view the contents of a file or directory. The write permission allows a user to modify or delete a file or directory.

    Rate this question:

  • 19. 

    Given the following output from the ls command, how many files are linked with file1? drwxr-xr-x    3 root     root         4096 Apr  8 07:12 Desktop -rw-r--r--    3 root     root          282 Apr 29 22:06 file1 -rw-r--r--    1 root     root          282 Apr 29 22:06 file2 -rw-r--r--    4 root     root          282 Apr 29 22:06 file3 -rw-r--r--    2 root     root          282 Apr 29 22:06 file4 -rw-r--r--    1 root     root          282 Apr 29 22:06 file5 -rw-r--r--    1 user1    sys           282 Apr 29 22:06 file6

    • A.

      One

    • B.

      Two

    • C.

      Three

    • D.

      Four

    Correct Answer
    B. Two
    Explanation
    Two files are linked with file1. This can be determined by looking at the output of the ls command. The lines that start with "drwxr-xr-x" and "rw-r--r--" are not relevant to the question as they represent directories and permissions. The lines that start with "rw-r--r--" and have "root" as the owner are the files. In this case, file1 and file2 are the only files that meet this criteria. Therefore, the answer is two.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 16, 2009
    Quiz Created by
    Ajeff
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.