16. Question: You are working on a system and want to compile a program from source code. You realize you need some development tools. In which directory do you expect to find these tools?
Option 1: /usr/bin
Option 2: /opt
Option 3: /usr/local/bin
Option 4: /usr/include
Correct Answer: 3
Explanation: Development tools, such as compilers and libraries, are typically located in the /usr/local/bin directory. This directory is used for installing local software that is not managed by the system’s package manager. It is a common location for development tools.
17. Question: Suppose you are setting up a new server. You want to ensure that each user on the system has their own private space to store files and data. Which directory structure in Linux helps achieve this?
Option 1: /var
Option 2: /tmp
Option 3: /home
Option 4: /etc
Correct Answer: 3
Explanation: To provide each user with their own private space to store files and data, you can use the /home directory structure in Linux. User home directories are typically located within /home, ensuring separation for user privacy and data security.
18. Question: You have been assigned a task to review the system’s startup scripts. In which directory would you primarily look for initialization scripts for different runlevels?
Option 1: /etc/runlevels
Option 2: /usr/bin/init
Option 3: /etc/rc.d
Option 4: /etc/init.d
Correct Answer: 4
Explanation: To find initialization scripts for different runlevels, you would primarily look in the /etc/init.d directory. This directory contains scripts and links used to manage services and their runlevels on a Linux system.
19. Question: What is the command used in Linux to display the contents of a file?
Option 1: cat
Option 2: cd
Option 3: ls
Option 4: rm
Correct Answer: 1
Explanation: In Linux, the cat command is used to display the contents of a file. It stands for “concatenate” and is commonly used to view the contents of text files in the terminal. You can also use it to create, merge, and display file contents.
20. Question: Which command in the terminal allows you to change directories?
Option 1: cd
Option 2: cat
Option 3: ls
Option 4: pwd
Correct Answer: 1
Explanation: The cd command is used to change directories in the terminal. It stands for “change directory” and is a fundamental command for navigating the Linux file system. You can use it to move between different directories or folders.