[Apr-2024] Pass Lpi 702-100 Exam in First Attempt Guaranteed!
Full 702-100 Practice Test and 62 unique questions with explanations waiting just for you, get it now!
NEW QUESTION # 29
What symbol is used in the vi editor to start the forward search for a string? (Specify ONLY the single character symbol without any parameters)
Answer:
Explanation:
/
Explanation
The symbol / is used in the vi editor to start the forward search for a string. It is followed by the string to be searched and then Enter to execute the search. The vi editor highlights the first occurrence of the string after the cursor position. To find the next occurrence of the string in the same direction, press n. To find the previous occurrence of the string in the opposite direction, press N. References:
How to Search to Find a Word in Vim or Vi Text Editor
How can I switch from forward to backward search in Vim?
How To Search in VI Editor
How to Search in Vim / Vi
NEW QUESTION # 30
Which of the following commands have to be used in order to update FreeBSD? (Choose TWO correct answers.)
- A. freebsd-update install
- B. freebsd-update resolvedeps
- C. freebsd-update fetch
- D. freebsd-update repoupdate
- E. freebsd-update all
Answer: A,C
Explanation:
Explanation
To update FreeBSD, the freebsd-update fetch command is used to download available binary updates, and the freebsd-update install command is used to apply the downloaded updates to the system. These commands are part of the freebsd-update utility, which supports binary security and errata updates to the FreeBSD base system without the need for manual compilation and installation2.
References:
FreeBSD Handbook - freebsd-update
NEW QUESTION # 31
How many /28 IPv4 subnets can be created within a /24 IPv4 prefix?
- A. 0
- B. 1
- C. 2
- D. 3
- E. 4
Answer: B
Explanation:
Explanation
A /24 IPv4 prefix provides 256 IP addresses, which is the number of addresses in one octet (2^8). A /28 subnet has 16 IP addresses (2^4). To calculate how many /28 subnets can fit into a /24 prefix, divide the total number of addresses in the /24 prefix by the number of addresses in a /28 subnet: 256 / 16 = 16. However, since each subnet has network and broadcast addresses that cannot be used for hosts, the actual number of usable subnets is less. In practice, you can create 16 subnets, each with 14 usable IP addresses for hosts.
References:
Subnet Cheat Sheet
IP Subnet Calculator
NEW QUESTION # 32
Which of the following lines stems from an ARP table?
- A. 127.0.0.1 localhost localhost.my.domain
- B. inet 192.168.122.11 netmask 0xffffff00 broadcast 192.168.122.255
- C. localhost link#2 UH lo0
- D. tcp4 0 0 192.168.122.11.22 192.168.122.1.38058 ESTABLISHED
- E. ? (192.168.122.1) at 52:54:00: a3:4e: 0e on em0
Answer: E
Explanation:
Explanation
This line stems from an ARP table because it shows the association between an IP address (192.168.122.1) and a MAC address (52:54:00: a3:4e: 0e) on a network interface (em0). ARP stands for Address Resolution Protocol, which is used to map IP addresses to MAC addresses on a local network. An ARP table is a list of these mappings that is maintained by each host on the network. The other lines are not from an ARP table, but from different sources, such as:
B: inet 192.168.122.11 netmask 0xffffff00 broadcast 192.168.122.255: This line is from the output of the ifconfig command, which displays the configuration of network interfaces. It shows the IP address, netmask, and broadcast address of the interface.
C: 127.0.0.1 localhost localhost.my.domain: This line is from the /etc/hosts file, which is used to map hostnames to IP addresses. It shows that the loopback address (127.0.0.1) is associated with the hostname localhost and the fully qualified domain name localhost.my.domain.
D: tcp4 0 0 192.168.122.11.22 192.168.122.1.38058 ESTABLISHED: This line is from the output of the netstat command, which displays the status of network connections. It shows that there is an established TCP connection between the local host (192.168.122.11) on port 22 and the remote host (192.168.122.1) on port 38058.
E: localhost link#2 UH lo0: This line is from the output of the route command, which displays the routing table. It shows that the destination localhost is reachable via the link layer interface lo0, which is the loopback interface. The UH flags indicate that the route is up and uses a host-specific gateway. References: 1: https://docs.freebsd.org/en/books/handbook/network-arp/ 2:
https://www.freebsd.org/cgi/man.cgi?query=ifconfig&sektion=8 3:
https://www.freebsd.org/cgi/man.cgi?query=hosts&sektion=5 4:
https://www.freebsd.org/cgi/man.cgi?query=netstat&sektion=1 5:
https://www.freebsd.org/cgi/man.cgi?query=route&sektion=8
NEW QUESTION # 33
Given the following listing
-rw-r-r- 1root whee115254 Nov 13 08:55 bobsfile
How can the superuser grant the user bob write permission to this file?
- A. chperm 664 bobsfile
- B. chown bob:bob bobsfile
- C. chgrp bob bobsfile
- D. chmod +x bobsfile
- E. vipw -u bob bobsfile
Answer: B
Explanation:
Explanation
The command chown changes the ownership of a file or directory. The syntax is chown user:group file, where user is the new owner and group is the new group of the file. In this case, the superuser can grant the user bob write permission to the file by changing both the owner and the group of the file to bob. This way, bob will have the same permissions as the original owner, which is read and write. Alternatively, the superuser can also use the command chmod to change the permissions of the file without changing the ownership. For example, chmod g+w bobsfile will add write permission to the group, and chmod o+w bobsfile will add write permission to others. However, these commands will also affect other users who belong to the same group or are not the owner or the group of the file. References:
FreeBSD Handbook: File and Directory Ownership
FreeBSD Handbook: File and Directory Permissions
Linux Professional Institute BSD Specialist: 702.1 Filesystem and Devices
NEW QUESTION # 34
How often does? match the preceding expression in a regular expression?
- A. Exactly one time
- B. Two or more times
- C. Any number of times
- D. One or more times
- E. Zero or one times
Answer: E
Explanation:
Explanation
The question mark (?) is a special character in regular expressions that modifies the preceding expression to match zero or one times. For example, the regular expression colou?r matches both color and colour, but not colouur or colr. The question mark is also used to make an expression non-greedy, meaning that it will match the shortest possible string instead of the longest. For example, the regular expression <.?> matches the first pair of angle brackets in a string, while <.> matches the entire string enclosed by the outermost pair of angle brackets. References:
Regular expression - Wikipedia, section "Basic concepts"
How to write Regular Expressions? - GeeksforGeeks, section "Special Characters"
NEW QUESTION # 35
Which command sets 192.168 1 1 as the default gateway on a BSD system'?
- A. route default 192.168.1.1
- B. route gateway 192.168.1.1
- C. route set 192.168.1.1
- D. route add default 192.168.1.1
- E. route add gw 192.168.1.1
Answer: D
Explanation:
Explanation
The command route add default 192.168.1.1 is used to set the default gateway on a BSD system. This command adds a default route to the routing table, directing traffic to the specified gateway IP address when no other route matches.
References:
FreeBSD Handbook - Routing
OpenBSD Change, Add or Display Default Gateway
NEW QUESTION # 36
Which command can be used to display the local filesystems that are currently mounted'?
- A. mount -a
- B. rpcinfo
- C. df -h C du -s
- D. cat /etc/fstab
Answer: C
Explanation:
Explanation
The command df -h displays the disk space usage of all mounted filesystems in a human-readable format. It shows the size, used, available, and percentage of each filesystem, as well as the mount point. This command can be used to check the local filesystems that are currently mounted.
https://unix.stackexchange.com/questions/24182/how-to-get-the-complete-and-exact-list-of-mounted-filesystems
https://www.tecmint.com/find-mounted-file-systems-in-linux/
https://itslinuxfoss.com/check-filesystem-mounted-linux/
NEW QUESTION # 37
Which FreeBSD command updates packages to newer versions'?
- A. pkg audit
- B. pkg update
- C. pkg upgrade
- D. pkg refresh
- E. pkg pull
Answer: C
Explanation:
Explanation
The command pkg upgrade is used to update FreeBSD packages to newer versions. It compares the versions of installed packages with those in the repositories and performs upgrades as necessary. The pkg update command is used to update the repository catalog, but it does not perform the actual package upgrades1.
References:
FreeBSD Handbook - Packages and Ports
NEW QUESTION # 38
What is the name of the NetBSD installation program?
- A. anaconda
- B. nbinsta11
- C. sysinst
- D. sysinsta11
- E. bsd.rd
Answer: C
Explanation:
Explanation
The name of the NetBSD installation program is sysinst. It is the standard installer used by NetBSD for setting up the system on a new machine. The sysinst program guides users through the installation process, including disk partitioning, package selection, and system configuration45.
References:
NetBSD Guide - Example installation
NetBSD Guide - Installing NetBSD: Preliminary considerations and preparations
NEW QUESTION # 39
Which command shows the current user's group memberships?
- A. ident
- B. showuser
- C. who
- D. group
- E. groups
Answer: E
Explanation:
Explanation
The groups command is used to show the current user's group memberships on BSD systems. The command prints the names of the primary and secondary groups that the user belongs to, separated by spaces. The primary group is the one that is assigned to new files and directories created by the user. The secondary groups are the ones that grant additional permissions or access to the user. For example, the output of groups for a user named alice might look like this:
alice wheel staff
This means that alice's primary group is alice, and her secondary groups are wheel and staff. The wheel group is typically used for granting administrative privileges, such as using the su or sudo commands. The staff group might be used for granting access to certain resources or directories that are shared by a group of users.
The other options are either invalid commands or do not show the user's group memberships. For example, group is not a valid command, ident is used to query an ident protocol server, showuser is not a valid command, and who is used to show who is logged on the system.
References:
groups - FreeBSD groups(1) Manual Page1
Group Management - FreeBSD Handbook2
NEW QUESTION # 40
Which of the following tar options handle compression'? (Choose TWO correct answers)
- A. -v
- B. -z
- C. -J
- D. -c
- E. -x
Answer: B,C
Explanation:
Explanation
The tar command is used to create or extract compressed archive files on BSD systems. It can handle various compression formats, such as gzip, bzip2, xz, and lzma. The tar command takes different options to specify the compression type, such as -z for gzip, -j for bzip2, -J for xz, and -Z for lzma. The other options are not related to compression, but to other functions of the tar command, such as -x for extracting, -c for creating, and -v for verbose output. References:
[tar(1) - OpenBSD manual pages]
[FreeBSD Handbook - Chapter 3. Unix Basics]
[FreeBSD Handbook - Chapter 18. Storage]
NEW QUESTION # 41
Which configuration file defines the order of the name resolution methods used on a NetBSD system'?
- A. /etc/resolv.conf
- B. /etc/nsswitch.conf
- C. /etc/hosts
- D. /etc/rc.conf
- E. /etc/named
Answer: B
Explanation:
Explanation
The /etc/nsswitch.conf file defines the order of the name resolution methods used on a NetBSD system. It specifies the sources and their priority for various databases, such as hosts, services, protocols, etc. The sources can be files, DNS, NIS, or other services. For example, the following line in /etc/nsswitch.conf indicates that the hosts database should be looked up first in the /etc/hosts file, then in the DNS server, and finally in the NIS server:
hosts: files dns nis
References:
nsswitch.conf(5) - NetBSD Manual Pages
Chapter 23. The NetBSD Network Configuration Files
NEW QUESTION # 42
Which device stands for the first BSD disk slice in the disk label on the first partition on the second SATA disk on OpenBSD?
- A. /dev/sata2a
- B. /dev/slld2
- C. /dev/sdla
- D. /dev/sdlp2d
- E. /dev/d2sl
Answer: D
Explanation:
Explanation
According to the BSD disklabel documentation1, the device name for a BSD disk slice consists of three parts:
the disk name, the partition letter, and the slice number. The disk name is determined by the driver and the order of detection, and it usually follows the pattern of sdX, where X is a letter from a to z. The partition letter is a lowercase letter from a to p, excluding c, which is reserved for the whole disk. The slice number is a decimal number from 0 to 15, indicating the MBR partition that contains the BSD disklabel. Therefore, the device name for the first BSD disk slice in the disk label on the first partition on the second SATA disk on OpenBSD is /dev/sdlp2d, where sdl is the disk name, p is the partition letter, and 2 is the slice number.
References1: BSD disklabel - Wikipedia
NEW QUESTION # 43
While using vi as superuser. the attempt to save a file while quitting the editor leads to an error indicating that the file is read-only. How can the file permissions be overridden to save the edits to the file and quit the editor?
- A. : fw!
- B. : wq
- C. : ql
- D. : fwq
- E. : wq!
Answer: E
Explanation:
Explanation
The wq! command is used to save a file and quit the vi editor, even if the file is read-only. The w command means write, the q command means quit, and the ! command means force. By combining these commands, the vi editor will override the file permissions and save the changes to the file, then exit the editor. The other options are either invalid syntax or do not force the write operation. For example, wq will save and quit only if the file is writable, ql will quit without saving, and fw! will force write but not quit. References:
[vi] - FreeBSD vi(1) Manual Page
[wq!] - How to save a file in vi / vim editor in Linux / Unix
NEW QUESTION # 44
What command creates a new directory? (Specify ONLY the command without any path or parameters.)
Answer:
Explanation:
mkdir
Explanation
The command mkdir (short for make directory) creates a new directory with the specified name. The command takes one or more arguments, which are the names of the directories to be created. If the name contains spaces or other special characters, it should be enclosed in quotes. For example, mkdir "My Documents" creates a directory named My Documents. The command also accepts some options, such as -p, which creates the parent directories if they do not exist, or -m, which sets the permissions of the new directory.
For example, mkdir -p -m 755 /usr/local/bin creates the directory /usr/local/bin and its parent directories /usr and /usr/local, and sets the permissions of /usr/local/bin to 755 (read, write and execute for the owner, read and execute for the group and others). References:
[mkdir(1) - FreeBSD Manual Pages]
[How to Create a Directory in Linux - Linuxize]
NEW QUESTION # 45
Which of the following lines in /etc/fstab mounts the device /dev/cd0a to /cdrom?
- A. cd9660:/dev/cd0a /cdrom ro 0 0
- B. /dev/cdOa /cdrom type=cd9660, mode=ro,uid=0,gid=0
- C. /cdrom /dev/cdOa cd9660 ro 0 0
- D. /dev/cd0a /cdrom cd9660 ro 0 0
- E. cd9660@/dev/cd0a:/cdrom cd9660 ro 0 0
Answer: D
Explanation:
Explanation
The /etc/fstab file contains information about the file systems that are mounted automatically at boot time or by the mount command. The file has six fields separated by whitespace: device, mount point, file system type, mount options, dump frequency, and pass number. The correct answer is D because it specifies the device (/dev/cd0a), the mount point (/cdrom), the file system type (cd9660), the mount option (ro for read-only), and the dump frequency and pass number (both 0 for no backup or fsck). The other answers are incorrect because they either have the wrong syntax, the wrong order of fields, or the wrong file system type. References:
BSD Specialist Exam 702 Objectives, Topic 715: Basic Unix Skills, 715.2 File and Directory Management FreeBSD Handbook, Chapter 3: FreeBSD Basics, 3.8.2 Mounting and Unmounting File Systems
NEW QUESTION # 46
......
Get Latest 702-100 Dumps Exam Questions in here: https://actualtests.testinsides.top/702-100-dumps-review.html