

















































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A comprehensive practice exam covering open-source workflows, Linux command-line proficiency, and Git-based version control. Candidates demonstrate competency in Linux filesystem navigation, scripting, process management, package installation, and system permissions. The Git portion evaluates branching strategies, conflict resolution, interactive rebase, patch creation, and collaborative workflows using pull requests. The exam also covers open-source principles, licensing, governance models, and contribution guidelines, ensuring candidates can operate effectively within distributed development communities.
Typology: Exams
1 / 89
This page cannot be seen from the preview
Don't miss anything!


















































































Question 1. Which of the following best defines Open Source Software (OSS)? A) Software whose source code is publicly available and can be freely modified and redistributed. B) Software that is free of charge but closed source. C) Proprietary software with a subscription model. D) Software that is only available to academic institutions. Answer: A Explanation: OSS is characterized by publicly accessible source code that users may modify and share under defined licenses. Question 2. The GNU General Public License (GPL) is an example of which type of license? A) Permissive license B) Copyleft license C) Public domain dedication D) Proprietary license Answer: B Explanation: GPL requires derivative works to be distributed under the same license, embodying the copyleft principle. Question 3. Which of the following is a primary advantage of using OSS in a commercial product? A) Guarantees zero security vulnerabilities. B) Eliminates all development costs. C) Enables access to a large community for support and contributions. D) Provides a single vendor for support. Answer: C
Explanation: OSS communities often provide extensive support, patches, and feature contributions. Question 4. In the context of OSS governance, a “benevolent dictator for life” (BDFL) refers to: A) A formal legal entity that owns the project. B) A single individual with final decision‑making authority, though community input is welcomed. C) A rotating committee of contributors. D) An automated AI system that merges pull requests. Answer: B Explanation: A BDFL is a person who guides the project’s direction while considering community feedback. Question 5. Which licensing model allows proprietary software to incorporate OSS code without requiring the proprietary code to be open sourced? A) GPLv B) LGPL C) AGPL D) MIT Answer: D Explanation: The MIT license is permissive, allowing inclusion in proprietary products without imposing source‑code disclosure. Question 6. The Linux kernel was originally released under which license? A) BSD License B) Apache License 2.
B) /etc/shadow C) /etc/group D) /etc/hosts Answer: A Explanation: /etc/passwd stores user account details such as username, UID, and home directory. Question 10. What is the purpose of the systemd unit type “socket”? A) To manage hardware device drivers. B) To start a service on demand when a network socket receives traffic. C) To define filesystem mount points. D) To configure kernel parameters. Answer: B Explanation: Socket units listen for connections and activate associated services when activity occurs. Question 11. Which of the following best describes a “fork” in Git? A) Creating a new branch within the same repository. B) Cloning a repository to a separate location where independent development can occur. C) Merging two unrelated repositories. D) Deleting a repository permanently. Answer: B Explanation: Forking creates a copy of a repository under a different user/account for independent work. Question 12. In Git, what does the command git rebase - i HEAD~3 allow you to do?
A) Interactively edit the last three commit messages or combine commits. B) Delete the last three commits permanently. C) Push the last three commits to the remote repository. D) Create three new branches from HEAD. Answer: A Explanation: The interactive rebase lets you edit, reorder, squash, or drop the specified commits. Question 13. Which continuous integration (CI) service is natively integrated with GitHub? A) Travis CI B) Jenkins C) GitHub Actions D) CircleCI Answer: C Explanation: GitHub Actions provides CI/CD pipelines directly within GitHub repositories. Question 14. What is the primary function of the gcc command in Linux? A) Manage user groups. B) Compile C and C++ source code into executable binaries. C) Transfer files over the network. D) Monitor system performance. Answer: B Explanation: gcc (GNU Compiler Collection) compiles source files into object files or executables.
Question 18. Which of the following statements about the Apache License 2.0 is true? A) It requires derivative works to be licensed under the same terms. B) It permits patent grants to downstream users. C) It is a viral license that forces all linked code to be open source. D) It disallows commercial use. Answer: B Explanation: Apache 2.0 includes an explicit patent license to protect downstream users. Question 19. In Git, what does the git stash command accomplish? A) Permanently deletes uncommitted changes. B) Saves uncommitted changes on a stack for later re‑application. C) Commits changes directly to the remote repository. D) Creates a new branch with the current changes. Answer: B Explanation: git stash temporarily stores modifications, allowing you to work on a clean tree. Question 20. Which Linux command is used to display the last lines of a file and continue updating as the file grows? A) tail - f B) cat - n C) less D) grep - r Answer: A Explanation: tail - f follows the file, showing new lines as they are appended.
Question 21. Which of the following is NOT a typical reason for an OSS project to fail? A) Lack of clear governance. B. Overly restrictive licensing that discourages contributions. C. High community engagement and frequent releases. D. Poor documentation. Answer: C Explanation: High engagement and regular releases are indicators of a healthy project, not a cause of failure. Question 22. What does the git pull --rebase command do compared to a plain git pull? A) It merges the remote branch using a fast‑forward only. B) It rebases local commits on top of the fetched remote commits, avoiding a merge commit. C) It discards local changes and replaces them with the remote branch. D) It creates a new branch named “rebase”. Answer: B Explanation: --rebase reapplies local commits after fetching, resulting in a linear history. Question 23. In Linux, which directory typically contains system-wide configuration files? A) /usr/local/bin B) /etc C) /var/log D) /home Answer: B Explanation: /etc holds configuration files for the system and installed services.
Explanation: systemctl status <service> reports whether a service is active, failed, etc. Question 27. Which of the following tools is commonly used for automated testing in a CI pipeline for Python projects? A) JUnit B) Mocha C) pytest D) Selenium Answer: C Explanation: pytest is a popular testing framework for Python, often integrated into CI pipelines. Question 28. In Git, what is a “detached HEAD” state? A) When the repository has no remote configured. B) When HEAD points directly to a commit rather than a branch reference. C) When a branch is deleted but still referenced. D) When the repository is corrupted. Answer: B Explanation: A detached HEAD occurs when you checkout a specific commit, not a branch. Question 29. Which command creates a new empty Git repository in the current directory? A) git clone. B) git init C) git start D) git create
Answer: B Explanation: git init initializes a new repository, creating a .git directory. Question 30. What does the ln - s /opt/app /usr/local/bin/app command do? A) Creates a hard link named app in /usr/local/bin pointing to /opt/app. B) Creates a symbolic (soft) link named app in /usr/local/bin that points to /opt/app. C) Moves the directory /opt/app to /usr/local/bin/app. D) Deletes the file /opt/app. Answer: B Explanation: -s creates a symbolic link, allowing the target to be accessed via the link path. Question 31. Which of the following is a characteristic of a meritocratic governance model in OSS? A) Decisions are made solely by the original creator regardless of contributions. B) Contributors earn influence based on the quality and quantity of their contributions. C) All contributors have equal voting power from the start. D) Governance is outsourced to a commercial entity. Answer: B Explanation: Meritocracy rewards contributors who demonstrate expertise and commitment. Question 32. The df - h command in Linux shows: A) Disk free space in a human‑readable format. B) Detailed file permissions. C) Active network connections. D) Running processes.
B) To allow different components to be governed under licenses that best suit their functionality. C) To make the project proprietary. D) To avoid any licensing obligations. Answer: B Explanation: Different libraries may have incompatible licenses; using multiple licenses respects each component’s terms. Question 36. What does the git log --graph --oneline command display? A) A visual representation of the commit history as a graph with each commit shown in a single line. B) Only the most recent commit message. C) A list of all branches in the repository. D) The differences between two commits. Answer: A Explanation: --graph draws an ASCII graph, --oneline condenses each commit to a single line. Question 37. Which Linux command can be used to display the first 10 lines of a file? A) head - n 10 filename B) tail - n 10 filename C) cat - 10 filename D) grep - m 10 '' filename Answer: A Explanation: head - n 10 outputs the initial 10 lines. Question 38. In a Linux filesystem, what is the purpose of the /proc directory?
A) Stores permanent user data. B) Contains virtual files that provide information about running processes and kernel parameters. C) Holds compiled binary executables. D) Serves as a backup location for system files. Answer: B Explanation: /proc is a pseudo‑filesystem exposing process and kernel information. Question 39. Which of the following is a benefit of using Git’s “reflog”? A) It shows the history of changes to remote branches only. B) It records updates to the tip of branches and HEAD, allowing recovery of lost commits. C) It displays a list of all tags in the repository. D) It automatically resolves merge conflicts. Answer: B Explanation: git reflog logs reference updates, enabling recovery of dangling commits. Question 40. What is the primary function of the make utility in Linux development? A) Manage user permissions. B) Automate the compilation process based on a Makefile’s dependency rules. C) Monitor network traffic. D) Compress files into archives. Answer: B Explanation: make reads a Makefile to determine which files need rebuilding and executes the necessary commands.
Question 44. What is the purpose of the git bisect command? A) To automatically find the commit that introduced a bug by binary search. B) To split a large commit into smaller ones. C) To create a new branch for testing. D) To compress the repository history. Answer: A Explanation: git bisect performs a binary search through commit history to locate the offending change. Question 45. Which of the following is an example of a “static analysis” tool for C code? A) gcc (compiler) B) valgrind C) cppcheck D) gdb Answer: C Explanation: cppcheck examines source code without executing it to find potential issues. Question 46. In Linux, which file is used to configure automatic mounting of filesystems at boot time? A) /etc/fstab B) /etc/hosts C) /etc/rc.local D) /etc/passwd Answer: A
Explanation: /etc/fstab lists filesystems and mount options for automatic mounting. Question 47. Which Git workflow encourages developers to keep the main (or master) branch always in a deployable state? A) Git Flow B) Forking workflow C) Trunk‑based development D. Feature‑branch workflow Answer: C Explanation: Trunk‑based development merges small, frequent changes directly to the main branch. Question 48. Which command can be used to display the current kernel version? A) uname - a B) cat /proc/version C) dmesg | grep Linux D) All of the above Answer: D Explanation: All listed commands provide the kernel version information. Question 49. What does the git remote add upstream <url> command typically achieve in a forked repository? A) Sets the original project repository as a remote called “upstream” for pulling updates. B) Renames the origin remote to upstream. C) Deletes the upstream remote. D) Pushes local changes to the original repository.
B) To serve as a central remote repository that does not contain a working tree. C) To enable graphical commit browsing. D) To store large binary assets only. Answer: B Explanation: Bare repositories lack a checked‑out working directory, making them suitable as central remotes. Question 53. What does the git tag - a v1.0 - m "Release 1.0" command do? A) Creates an annotated tag named v1.0 with the message “Release 1.0”. B) Deletes the tag v1.0. C) Moves the branch named v1.0 to the current commit. D) Pushes all tags to the remote repository. Answer: A Explanation: -a creates an annotated tag, and -m provides a tag message. Question 54. Which of the following is NOT a typical task performed by a Linux system administrator? A) Managing user accounts and permissions. B. Compiling kernel modules for hardware support. C. Writing high‑level business strategy for the company. D. Monitoring system performance and logs. Answer: C Explanation: Business strategy is outside the technical scope of system administration. Question 55. In Git, what is the effect of the command git reset --hard HEAD~1?
A) Moves the current branch back one commit and discards all changes in the working directory and index. B) Creates a new branch at the previous commit. C) Stashes the current changes for later use. D) Merges the previous commit into the current one. Answer: A Explanation: --hard resets the HEAD, index, and working tree to the specified commit, losing uncommitted changes. Question 56. Which of the following tools is commonly used to automate building Docker images in CI pipelines? A) Ansible B) Dockerfile C) Jenkinsfile D) Docker Compose Answer: B Explanation: A Dockerfile defines the steps to build a Docker image; CI systems use it to automate image creation. Question 57. What does the sudo command allow a regular user to do? A) Switch to another user account without a password. B) Execute commands with elevated (root) privileges after authentication. C) Permanently change the user’s UID. D) Disable the firewall. Answer: B Explanation: sudo grants temporary root privileges to authorized users.