Q. Which command is used to display or change the current directory?

  • (A) pwd
  • (B) cd
  • (C) ls
  • (D) dir
πŸ’¬ Discuss
βœ… Correct Answer: (A) pwd
Explanation: 'pwd' displays the current directory path.

Q. Which command is used to display the contents of a text file one page at a time?

  • (A) more filename
  • (B) cat filename
  • (C) less filename
  • (D) head filename
πŸ’¬ Discuss
βœ… Correct Answer: (A) more filename
Explanation: 'more' displays file contents one screen at a time.

Q. What does the 'ln -s source target' command do?

  • (A) Creates a symbolic link named target to source
  • (B) Copies source to target
  • (C) Moves source to target
  • (D) Deletes source and target
πŸ’¬ Discuss
βœ… Correct Answer: (A) Creates a symbolic link named target to source
Explanation: 'ln -s' creates a soft link.

Q. Which command displays the current user's username?

  • (A) whoami
  • (B) id
  • (C) who
  • (D) users
πŸ’¬ Discuss
βœ… Correct Answer: (A) whoami
Explanation: 'whoami' prints the current username.

Q. Which file defines network interfaces on Debian-based systems?

  • (A) /etc/network/interfaces
  • (B) /etc/netconfig
  • (C) /etc/sysconfig/network-scripts/ifcfg-eth0
  • (D) /etc/hosts
πŸ’¬ Discuss
βœ… Correct Answer: (A) /etc/network/interfaces
Explanation: Debian uses /etc/network/interfaces for network config.

Q. Which command is used to change file ownership?

  • (A) chown
  • (B) chmod
  • (C) chgrp
  • (D) own
πŸ’¬ Discuss
βœ… Correct Answer: (A) chown
Explanation: 'chown' changes file owner.

Q. Which command will display all active network connections?

  • (A) netstat -tuln
  • (B) ifconfig
  • (C) ping
  • (D) traceroute
πŸ’¬ Discuss
βœ… Correct Answer: (A) netstat -tuln
Explanation: 'netstat -tuln' lists all listening and active TCP/UDP ports.

Q. Which file contains system-wide environment variables?

  • (A) /etc/environment
  • (B) /etc/profile
  • (C) ~/.bashrc
  • (D) ~/.profile
πŸ’¬ Discuss
βœ… Correct Answer: (A) /etc/environment
Explanation: /etc/environment sets system-wide environment variables.

Q. Which command is used to show disk partition information?

  • (A) fdisk -l
  • (B) df -h
  • (C) mount
  • (D) lsblk
πŸ’¬ Discuss
βœ… Correct Answer: (A) fdisk -l
Explanation: 'fdisk -l' lists disk partitions.

Q. Which command can be used to search for a string inside files?

  • (A) grep
  • (B) find
  • (C) locate
  • (D) search
πŸ’¬ Discuss
βœ… Correct Answer: (A) grep
Explanation: 'grep' searches text inside files.