Linux MCQs with answers Page - 169

Here, you will find a collection of MCQ questions on Linux. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

D

Dhruva Jagannath • 660 Points
Invincible

Q. Which command is used to view and manage disk partitions interactively?

  • (A) fdisk
  • (B) diskman
  • (C) mount
  • (D) lsblk

D

Dhruva Jagannath • 660 Points
Invincible

Q. Which option with the 'rm' command is used to prompt before every removal?

  • (A) -f
  • (B) -i
  • (C) -r
  • (D) -p

D

Dhruva Jagannath • 660 Points
Invincible

Q. Which command will compress files using bzip2 compression?

  • (A) gzip
  • (B) zip
  • (C) bzip2
  • (D) compress

D

Dhruva Jagannath • 660 Points
Invincible

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

D

Dhruva Jagannath • 660 Points
Invincible

Q. What does the 'alias' command do?

  • (A) Creates symbolic links
  • (B) Changes file ownership
  • (C) Assigns shortcuts to commands
  • (D) Changes shell

D

Dhruva Jagannath • 660 Points
Invincible

Q. Which command is used to find the location of a command binary?

  • (A) whereis
  • (B) which
  • (C) locate
  • (D) find

D

Dhruva Jagannath • 660 Points
Invincible

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

D

Dhruva Jagannath • 660 Points
Invincible

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

D

Dhruva Jagannath • 660 Points
Invincible

Q. Which option with 'grep' makes the search case-insensitive?

  • (A) -i
  • (B) -c
  • (C) -v
  • (D) -n

D

Dhruva Jagannath • 660 Points
Invincible

Q. Which command shows real-time log updates?

  • (A) view /var/log/syslog
  • (B) tail -f /var/log/syslog
  • (C) cat /var/log/syslog
  • (D) read /var/log/syslog