Q. Which command is used to schedule a job to run once at a specific time?

  • (A) at
  • (B) cron
  • (C) batch
  • (D) systemd
πŸ’¬ Discuss
βœ… Correct Answer: (A) at
Explanation: 'at' schedules one-time tasks.

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

  • (A) Runs a command with elevated privileges
  • (B) Switches user
  • (C) Stops a process
  • (D) Updates the system
πŸ’¬ Discuss
βœ… Correct Answer: (A) Runs a command with elevated privileges
Explanation: 'sudo' allows running commands as root or another user.

Q. Which command lists users currently logged in?

  • (A) who
  • (B) w
  • (C) users
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above
Explanation: All commands list logged-in users with varying details.

Q. What does the 'history' command do?

  • (A) Displays previously executed commands
  • (B) Shows system logs
  • (C) Shows file versions
  • (D) Deletes command history
πŸ’¬ Discuss
βœ… Correct Answer: (A) Displays previously executed commands
Explanation: 'history' lists command line history.

Q. Which command will compress files using gzip?

  • (A) gzip filename
  • (B) zip filename
  • (C) compress filename
  • (D) tar filename
πŸ’¬ Discuss
βœ… Correct Answer: (A) gzip filename
Explanation: 'gzip' compresses files using GNU zip algorithm.

Q. How do you display the last 20 lines of a file?

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

Q. Which command is used to change the priority of a running process?

  • (A) renice
  • (B) nice
  • (C) kill
  • (D) ps
πŸ’¬ Discuss
βœ… Correct Answer: (A) renice
Explanation: 'renice' changes priority of an existing process.

Q. Which directory contains user home directories?

  • (A) /home
  • (B) /usr
  • (C) /root
  • (D) /var
πŸ’¬ Discuss
βœ… Correct Answer: (A) /home
Explanation: /home holds directories for normal users.

Q. Which command shows all available disks and partitions in a tree format?

  • (A) lsblk
  • (B) blkid
  • (C) fdisk -l
  • (D) df -h
πŸ’¬ Discuss
βœ… Correct Answer: (A) lsblk
Explanation: 'lsblk' lists block devices in a tree hierarchy.

Q. Which command is used to change the group ownership of a file?

  • (A) chgrp
  • (B) chmod
  • (C) chown
  • (D) grpchg
πŸ’¬ Discuss
βœ… Correct Answer: (A) chgrp
Explanation: 'chgrp' changes the group ownership of a file.