Q. What is the purpose of the 'ps' command?

  • (A) Displays currently running processes
  • (B) Shows system uptime
  • (C) Lists disk usage
  • (D) Displays network connections
πŸ’¬ Discuss
βœ… Correct Answer: (A) Displays currently running processes
Explanation: 'ps' shows a snapshot of running processes.

Q. Which of the following commands will display hidden files when listing directory contents?

  • (A) ls -a
  • (B) ls -l
  • (C) ls -h
  • (D) ls -r
πŸ’¬ Discuss
βœ… Correct Answer: (A) ls -a
Explanation: 'ls -a' lists all files, including hidden ones.

Q. What is the function of the 'kill' command?

  • (A) Terminates processes
  • (B) Starts a new process
  • (C) Lists processes
  • (D) Changes process priority
πŸ’¬ Discuss
βœ… Correct Answer: (A) Terminates processes
Explanation: 'kill' sends signals to processes, often to terminate them.

Q. Which command displays the current directory path?

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

Q. What does the 'tar -xvf archive.tar' command do?

  • (A) Extracts files from a tar archive
  • (B) Creates a tar archive
  • (C) Lists contents of a tar archive
  • (D) Compresses a file
πŸ’¬ Discuss
βœ… Correct Answer: (A) Extracts files from a tar archive
Explanation: '-xvf' extracts the archive verbosely and specifies file.

Q. Which command will show all open files on the system?

  • (A) lsof
  • (B) openfiles
  • (C) listfiles
  • (D) files
πŸ’¬ Discuss
βœ… Correct Answer: (A) lsof
Explanation: 'lsof' lists open files and processes using them.

Q. What is the command to display the first 15 lines of a file?

  • (A) head -15 filename
  • (B) tail -15 filename
  • (C) cat filename | head
  • (D) more filename
πŸ’¬ Discuss
βœ… Correct Answer: (A) head -15 filename
Explanation: 'head -15' shows the first 15 lines.

Q. Which file contains the list of mounted filesystems?

  • (A) /etc/fstab
  • (B) /etc/mounts
  • (C) /proc/mounts
  • (D) /var/mount
πŸ’¬ Discuss
βœ… Correct Answer: (A) /etc/fstab
Explanation: /etc/fstab configures filesystem mounts at boot.

Q. Which command is used to update package index on Debian-based systems?

  • (A) apt update
  • (B) yum update
  • (C) rpm update
  • (D) pacman -Sy
πŸ’¬ Discuss
βœ… Correct Answer: (A) apt update
Explanation: 'apt update' refreshes package repository data.

Q. What does the 'df' command do?

  • (A) Displays disk space usage
  • (B) Shows file permissions
  • (C) Lists files in a directory
  • (D) Displays network status
πŸ’¬ Discuss
βœ… Correct Answer: (A) Displays disk space usage
Explanation: 'df' reports filesystem disk space usage.