Which network file system allows sharing files and printers among Linux and Windows systems?

  • Samba
  • NFS
  • CIFS
  • FTP
Samba is the network file system that allows sharing files and printers among Linux and Windows systems. It enables Linux systems to interact seamlessly with Windows networks, sharing resources across the platforms.

What does the $# variable represent in a shell script?

  • The number of arguments passed to the script
  • The exit status of the previous command
  • The process ID of the script
  • The current working directory
The $# variable in a shell script represents the number of arguments passed to the script. This is useful for determining how many arguments were provided when calling the script and for performing conditional logic based on the number of arguments.

To check for equality without considering the type in JavaScript, you should use ______.

  • === (Triple Equals)
  • == (Double Equals)
  • #NAME?
  • !== (Not Equals)
In JavaScript, the "===" operator, known as the triple equals operator, is used to check for equality without considering the data types of the operands. It ensures both the value and the type of the operands are identical.

What challenge is commonly associated with callback functions in asynchronous JavaScript?

  • Synchronous execution
  • Callback hell
  • Memory leaks
  • Variable scope
Callback hell is a common challenge in asynchronous JavaScript. It occurs when you have multiple nested callbacks, making the code hard to read and maintain. This situation can lead to callback hell, where code becomes difficult to manage and understand.

How can the issues related to memory leaks due to closures be mitigated in JavaScript?

  • Using WeakMaps
  • Increasing Closure Scope
  • Avoiding Closures
  • Garbage Collection
Memory leaks due to closures can be mitigated by using WeakMaps in JavaScript. WeakMaps are a data structure that allows objects to be held weakly, meaning they won't prevent objects from being garbage collected. This helps in preventing memory leaks that can occur when closures hold references to objects longer than necessary.

When different classes have methods of the same name, this is referred to as method _________.

  • overriding
  • overloading
  • overloading
  • overriding
When different classes have methods of the same name with different parameters, this is referred to as "method overloading." Method overloading allows a class to have multiple methods with the same name but different parameter lists.

When debugging a shell script, which option can be used with the bash command to enable debugging output?

  • #NAME?
  • #NAME?
  • #NAME?
  • #NAME?
When debugging a shell script, you can use the -x option with the bash command to enable debugging output. This option displays each command as it is executed, making it useful for identifying issues and understanding the script's execution flow.

What is the primary purpose of the df command in Linux?

  • Display disk space usage
  • List all files in a directory
  • Execute a shell script
  • Calculate file checksums
The primary purpose of the df command is to display disk space usage on a Linux system. It provides information about the disk space used and available on various mounted filesystems. This command is useful for monitoring disk space to prevent overflows.

Which file system is designed to offer advanced features such as pooling, snapshots, and checksums?

  • Btrfs
  • ext3
  • XFS
  • JFS
Btrfs (B-Tree File System) is designed to offer advanced features such as data pooling, snapshots, and checksums. It is a next-generation file system that provides data integrity and efficient storage management. Btrfs is often used in modern Linux distributions for its advanced capabilities.

KVM stands for Kernel-based Virtual _________.

  • Machine
  • Manager
  • Memory
  • Module
KVM stands for Kernel-based Virtual Machine. It is a Linux kernel module that enables hardware-assisted virtualization, allowing you to run multiple virtual machines on a single host.