πŸ“Š Linux
Q. Which command is used to list all running services in a systemd-based system?
  • (A) service --status-all
  • (B) sysctl list
  • (C) systemctl list-units --type=service
  • (D) service list
πŸ’¬ Discuss
βœ… Correct Answer: (C) systemctl list-units --type=service

Explanation: 'systemctl list-units --type=service' lists all active services managed by systemd.

πŸ“Š Linux
Q. Which command is used to view and manage disk partitions interactively?
  • (A) fdisk
  • (B) diskman
  • (C) mount
  • (D) lsblk
πŸ’¬ Discuss
βœ… Correct Answer: (A) fdisk

Explanation: 'fdisk' is a command-line utility to create, delete, and manage disk partitions.

πŸ“Š Linux
Q. Which option with the 'rm' command is used to prompt before every removal?
  • (A) -f
  • (B) -i
  • (C) -r
  • (D) -p
πŸ’¬ Discuss
βœ… Correct Answer: (B) -i

Explanation: 'rm -i' prompts for confirmation before deleting each file.

πŸ“Š Linux
Q. Which command will compress files using bzip2 compression?
  • (A) gzip
  • (B) zip
  • (C) bzip2
  • (D) compress
πŸ’¬ Discuss
βœ… Correct Answer: (C) bzip2

Explanation: 'bzip2' compresses files using the Burrows–Wheeler block sorting text compression algorithm.

πŸ“Š Linux
Q. Which of the following commands will change the hostname of a Linux machine?
  • (A) change-hostname
  • (B) hostnamectl set-hostname
  • (C) sethost
  • (D) hostctl
πŸ’¬ Discuss
βœ… Correct Answer: (B) hostnamectl set-hostname

Explanation: 'hostnamectl set-hostname' is used to change the system's hostname.

πŸ“Š Linux
Q. What does the 'alias' command do?
  • (A) Creates symbolic links
  • (B) Changes file ownership
  • (C) Assigns shortcuts to commands
  • (D) Changes shell
πŸ’¬ Discuss
βœ… Correct Answer: (C) Assigns shortcuts to commands

Explanation: 'alias' lets you define shortcuts for frequently used commands.

πŸ“Š Linux
Q. Which command is used to find the location of a command binary?
  • (A) whereis
  • (B) which
  • (C) locate
  • (D) find
πŸ’¬ Discuss
βœ… Correct Answer: (B) which

Explanation: 'which' shows the full path of shell commands from your $PATH.

πŸ“Š Linux
Q. Which file is used to configure network interfaces in older Debian systems?
  • (A) /etc/network/interfaces
  • (B) /etc/netconfig
  • (C) /etc/networking
  • (D) /etc/inet/interfaces
πŸ’¬ Discuss
βœ… Correct Answer: (A) /etc/network/interfaces

Explanation: '/etc/network/interfaces' is the legacy file for configuring network interfaces in Debian-based systems.

πŸ“Š Linux
Q. What does the 'export' command do in Linux?
  • (A) Exports files to another directory
  • (B) Exports variables to the environment
  • (C) Creates archive backups
  • (D) Transfers files over the network
πŸ’¬ Discuss
βœ… Correct Answer: (B) Exports variables to the environment

Explanation: 'export' sets environment variables in the shell session.

πŸ“Š Linux
Q. Which option with 'grep' makes the search case-insensitive?
  • (A) -i
  • (B) -c
  • (C) -v
  • (D) -n
πŸ’¬ Discuss
βœ… Correct Answer: (A) -i

Explanation: '-i' tells 'grep' to ignore case during string matching.