LFD301 Introduction to Linux Open Source Development and GIT Practice Exam, Exams of Technology

This exam focuses on foundational Linux usage, open-source workflows, and Git version control. Scenarios include navigating the Linux CLI, file system hierarchies, permissions, shell scripting basics, open-source governance models, patch submission etiquette, and Git operations such as branching, rebasing, merging, resolving conflicts, and using GitHub/GitLab-style collaboration patterns. Ideal for testing readiness for real-world open-source contribution environments.

Typology: Exams

2025/2026

Available from 01/11/2026

shilpi-jain-1
shilpi-jain-1 🇮🇳

4.2

(5)

29K documents

1 / 90

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
LFD301 Introduction to Linux Open Source
Development and GIT Practice Exam
**Question 1.** Which of the following best describes the primary philosophical difference
between the Free Software movement and the Open Source Initiative (OSI)?
A) Free Software emphasizes user freedoms, while OSI emphasizes pragmatic development
benefits.
B) Free Software focuses on commercial licensing, while OSI promotes only GPL licensing.
C) Free Software rejects all proprietary code, while OSI allows mixedsource projects.
D) Free Software requires all contributors to be volunteers, while OSI mandates paid
contributors.
Answer: A
Explanation: The Free Software movement is rooted in the ethical principle of software
freedom, whereas the OSI promotes open source primarily for its practical advantages such as
faster development and better quality.
**Question 2.** In the context of opensource project governance, a “Benevolent Dictator for
Life” (BDFL) is best defined as:
A) A legal entity that owns the project’s trademark.
B) An elected committee that rotates every two years.
C) A single individual who has final say on technical decisions but usually acts in the
community’s interest.
D) A voting system where each contributor has equal weight.
Answer: C
Explanation: A BDFL is a single leader who retains ultimate authority over project direction
while typically encouraging community contributions.
**Question 3.** Which license is considered “copyleft” and therefore requires derivative works
to be distributed under the same license?
A) MIT License
B) Apache License 2.0
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a

Partial preview of the text

Download LFD301 Introduction to Linux Open Source Development and GIT Practice Exam and more Exams Technology in PDF only on Docsity!

Development and GIT Practice Exam

Question 1. Which of the following best describes the primary philosophical difference between the Free Software movement and the Open Source Initiative (OSI)? A) Free Software emphasizes user freedoms, while OSI emphasizes pragmatic development benefits. B) Free Software focuses on commercial licensing, while OSI promotes only GPL licensing. C) Free Software rejects all proprietary code, while OSI allows mixed‑source projects. D) Free Software requires all contributors to be volunteers, while OSI mandates paid contributors. Answer: A Explanation: The Free Software movement is rooted in the ethical principle of software freedom, whereas the OSI promotes open source primarily for its practical advantages such as faster development and better quality. Question 2. In the context of open‑source project governance, a “Benevolent Dictator for Life” (BDFL) is best defined as: A) A legal entity that owns the project’s trademark. B) An elected committee that rotates every two years. C) A single individual who has final say on technical decisions but usually acts in the community’s interest. D) A voting system where each contributor has equal weight. Answer: C Explanation: A BDFL is a single leader who retains ultimate authority over project direction while typically encouraging community contributions. Question 3. Which license is considered “copyleft” and therefore requires derivative works to be distributed under the same license? A) MIT License B) Apache License 2.

Development and GIT Practice Exam

C) GNU General Public License (GPL) D) BSD 2‑Clause License Answer: C Explanation: The GPL is a strong copyleft license; any modified or combined work must also be licensed under the GPL. Question 4. A developer wishes to contribute a small bug‑fix to an established project. Which of the following steps is the most appropriate first action? A) Fork the repository, make the change, and submit a pull request. B) Directly modify the upstream repository without permission. C) Send the patch file to the project’s mailing list without any discussion. D) Create a new repository and claim ownership of the project. Answer: A Explanation: Forking allows the contributor to work independently, then a pull request (or merge request) lets maintainers review and integrate the change. Question 5. Which of the following is NOT a common reason for an open‑source project to become abandoned? A) Loss of core maintainers. B) Consistent influx of new contributors. C) Lack of funding for infrastructure. D) Decline in user interest. Answer: B Explanation: An ongoing influx of contributors usually helps keep a project alive; abandonment typically stems from the opposite.

Development and GIT Practice Exam

Explanation: /usr holds shareable, read‑only data like installed applications, libraries, and documentation, separate from / and /var. Question 9. In a Bash shell, which of the following constructs correctly creates a symbolic (soft) link named link.txt that points to original.txt? A) ln original.txt link.txt B) ln - s original.txt link.txt C) ln - d original.txt link.txt D) ln --hard original.txt link.txt Answer: B Explanation: The -s option tells ln to create a symbolic link rather than a hard link. Question 10. Which command displays a hierarchical view of processes, showing parent‑child relationships? A) ps - ef B) top C) pstree D) htop Answer: C Explanation: pstree renders the process tree, illustrating how processes are spawned from one another. Question 11. When using Bash redirection, what does the operator >> accomplish? A) Overwrites the target file with new output. B) Appends output to the end of the target file without overwriting existing content. C) Redirects both stdout and stderr to a file.

Development and GIT Practice Exam

D) Sends output to the terminal while also writing it to a file. Answer: B Explanation: >> appends, whereas > overwrites. Question 12. Which of the following environment variables is used by the shell to locate executable programs? A) HOME B) PATH C) PWD D) SHELL Answer: B Explanation: PATH contains a colon‑separated list of directories that the shell searches for commands. Question 13. The man command is used to: A) Edit text files in a terminal. B) Display the manual page for a given command or library function. C) Monitor system performance in real time. D) List all currently loaded kernel modules. Answer: B Explanation: man fetches and shows the manual (documentation) for commands, system calls, and other topics. Question 14. Which of the following statements about the sudo command is FALSE? A) It allows a permitted user to execute a command with root privileges. B) It logs each command executed for audit purposes.

Development and GIT Practice Exam

A) %Name B) %Release C) %Version D) %Source0 Answer: C Explanation: %Version specifies the upstream version; %Release indicates the packaging iteration. Question 18. Which of the following tools would you use to check real‑time CPU usage and load average on a Linux system? A) ls B) df C) top D) chmod Answer: C Explanation: top provides an interactive, updating view of CPU, memory, and process information. Question 19. In the vi editor, which command saves the current file and exits the editor? A) :wq B) :qw C) :xq D) :qq Answer: A Explanation: :wq writes (saves) the file and quits; :q! quits without saving.

Development and GIT Practice Exam

Question 20. Which Bash construct correctly implements a loop that iterates over all .txt files in the current directory? A) for file in *.txt; do echo $file; done B) while file *.txt; do echo $file; done C) foreach file (*.txt) echo $file D) loop file in *.txt { echo $file } Answer: A Explanation: The for … in …; do …; done syntax iterates over the expanded list of files. Question 21. In a Bash script, which keyword is used to define a function named backup? A) def backup() B) function backup { … } C) backup() { … } D) proc backup { … } Answer: C Explanation: Bash functions are declared with name() { commands; }. The function keyword is optional but C is the canonical form. Question 22. When compiling a C program with gcc, which flag adds debugging symbols to the executable? A) -O2 B) -g C) -Wall D) -static Answer: B Explanation: -g tells gcc to include symbol information for use with debuggers like gdb.

Development and GIT Practice Exam

Explanation: update-alternatives maintains symbolic links for commands that have several implementations, allowing the admin to select the preferred one. Question 26. Which Git command creates a new branch called feature-x from the current HEAD? A) git branch feature-x B) git checkout - b feature-x C) git merge feature-x D) git init feature-x Answer: A (or B also works, but the direct creation command is git branch). Explanation: git branch <name> creates a branch reference; git checkout - b both creates and checks it out. Question 27. In Git, what does the git reflog command display? A) A list of all remote branches. B) The commit history of the current branch. C) A log of reference updates (e.g., HEAD moves) allowing recovery of lost commits. D) A diff between the working tree and the index. Answer: C Explanation: reflog records where branch heads and other refs have pointed, useful for undoing accidental resets or deletions. Question 28. Which of the following Git commands will permanently discard all local changes in the working directory, reverting to the last committed state? A) git reset --hard HEAD B) git revert HEAD

Development and GIT Practice Exam

C) git checkout . D) git clean - fd Answer: A Explanation: git reset --hard HEAD resets the index and working tree to match the last commit, discarding uncommitted changes. Question 29. When a merge conflict occurs, which Git command can be used to view the conflicting sections in a file? A) git diff --merge B) git status C) git log --conflict D) git show Answer: B (shows files with conflicts) – but to view details, git diff is also used. The most direct for locating conflicts is git status. Explanation: git status lists files with merge conflicts, prompting the user to resolve them. Question 30. Which Git command is used to find the commit that introduced a bug by binary searching the history? A) git blame B) git bisect C) git cherry-pick D) git revert Answer: B Explanation: git bisect performs a binary search through commits to pinpoint the one that caused a regression.

Development and GIT Practice Exam

Explanation: Systemd services are defined by .service units; ordering dependencies are expressed via After= lines. Question 34. Which command will display the amount of free and used memory on a Linux system in a human‑readable format? A) free - h B) df - h C) lsblk D) du - sh Answer: A Explanation: free - h shows RAM and swap usage with sizes expressed in KiB/MiB/GiB. Question 35. The chmod 4755 /usr/local/bin/myprog command sets which special permission on myprog? A) Setgid B) Sticky bit C) Setuid D) No special permission, only standard rwx bits Answer: C Explanation: The leading 4 sets the setuid bit, causing the program to run with the file owner’s privileges. Question 36. Which of the following best describes the purpose of the ldconfig command? A) It rebuilds the kernel module dependency list. B) It updates the system’s shared library cache, enabling dynamic linker to find libraries.

Development and GIT Practice Exam

C) It configures network interfaces. D) It clears the DNS cache. Answer: B Explanation: ldconfig scans directories for shared libraries and updates /etc/ld.so.cache. Question 37. In a Bash script, what is the effect of set - e? A) Enables extended pattern matching. B) Causes the script to exit immediately if any command returns a non‑zero status. C) Treats undefined variables as errors. D) Turns on debugging output for each command. Answer: B Explanation: set - e (errexit) makes the script stop on the first failing command. Question 38. Which of the following is a valid way to perform command substitution in Bash? A) $(date) B) %{date} C) [[date]] D) @@date@@ Answer: A Explanation: $() evaluates the command inside and substitutes its output; backticks `...` are an older form. Question 39. The awk utility is primarily used for: A) Editing binary files.

Development and GIT Practice Exam

A) lvcreate - L 10G - n lv_data vg_main B) vgcreate - L 10G - n lv_data vg_main C) pvcreate - L 10G - n lv_data vg_main D) mkfs - t ext4 - L 10G /dev/vg_main/lv_data Answer: A Explanation: lvcreate creates a logical volume; -L specifies size, -n names it, and the final argument is the volume group. Question 43. Which X Window System component is responsible for handling input devices such as keyboards and mice? A) X server B) Window manager C) X client D) Compositor Answer: A Explanation: The X server interacts directly with hardware input and output devices, providing services to client applications. Question 44. In GNOME, which utility provides a graphical way to manage software packages? A) yum B) aptitude C) Software Center (or gnome-software) D) rpm Answer: C Explanation: GNOME Software offers a GUI for browsing, installing, and updating packages.

Development and GIT Practice Exam

Question 45. Which of the following is NOT a valid Git object type? A) Blob B) Tree C) Commit D) Patch Answer: D Explanation: Git stores data as blobs (file contents), trees (directory structures), commits, and tags. “Patch” is not a native object type. Question 46. When using git push, which option forces the remote branch to accept a non‑fast‑forward update? A) --force-with-lease B) --dry-run C) --set-upstream D) --rebase Answer: A Explanation: --force-with-lease safely forces a push only if the remote hasn’t changed since the last fetch, preventing accidental overwrites. Question 47. In Bash, what does the expression ${var//a/b} do? A) Replaces the first occurrence of a with b in $var. B) Replaces all occurrences of a with b in $var. C) Removes all occurrences of a from $var. D) Performs arithmetic division of $var by b. Answer: B

Development and GIT Practice Exam

C) It stores system logs for audit. D) It configures network interfaces. Answer: B Explanation: /etc/sudoers (edited via visudo) controls sudo permissions and command restrictions. Question 51. Which of the following is a typical location for system‑wide environment variable definitions on most Linux distributions? A) ~/.bashrc B) /etc/profile C) /usr/local/bin D) /var/log Answer: B Explanation: /etc/profile (and files under /etc/profile.d/) are sourced for login shells system‑wide. Question 52. In the context of the X Window System, what does the acronym “WM” stand for? A) Window Manager B) Workstation Monitor C) Web Module D) Write Mode Answer: A Explanation: WM = Window Manager, responsible for window placement, decorations, and user interaction.

Development and GIT Practice Exam

Question 53. Which of the following commands will list all currently loaded kernel modules? A) lsmod B) modinfo C) dmesg D) insmod Answer: A Explanation: lsmod reads /proc/modules and displays the list of loaded modules. Question 54. When using git merge, what does the --no-ff flag enforce? A) It creates a merge commit even if a fast‑forward is possible, preserving branch history. B) It aborts the merge if conflicts are detected. C) It performs a fast‑forward merge regardless of history. D) It rebases the current branch onto the target. Answer: A Explanation: --no-ff forces a merge commit, keeping a clear record of the branch integration. Question 55. Which of the following statements about the systemctl command is FALSE? A) systemctl start <service> starts a service immediately. B) systemctl enable <service> configures a service to start at boot. C) systemctl mask <service> disables a service but still allows it to be started manually. D) systemctl is-active <service> reports whether a service is currently running. Answer: C Explanation: mask creates a symlink to /dev/null, preventing the service from being started, even manually.