Q. Which command can be used to monitor real-time system resource usage?

  • (A) top
  • (B) free
  • (C) vmstat
  • (D) uptime
πŸ’¬ Discuss
βœ… Correct Answer: (A) top
Explanation: 'top' displays dynamic real-time process and resource info.

Q. Which command lists all mounted file systems?

  • (A) mount
  • (B) df
  • (C) lsblk
  • (D) blkid
πŸ’¬ Discuss
βœ… Correct Answer: (A) mount
Explanation: 'mount' without arguments lists mounted filesystems.

Q. How can you display the first 10 lines of a file?

  • (A) head filename
  • (B) tail filename
  • (C) cat filename
  • (D) less filename
πŸ’¬ Discuss
βœ… Correct Answer: (A) head filename
Explanation: 'head' displays the first 10 lines by default.

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

  • (A) Creates a symbolic link
  • (B) Lists files
  • (C) Changes file permissions
  • (D) Removes a file
πŸ’¬ Discuss
βœ… Correct Answer: (A) Creates a symbolic link
Explanation: 'ln -s' creates a symbolic (soft) link to a file or directory.

Q. Which command is used to display the system hostname?

  • (A) hostname
  • (B) uname
  • (C) host
  • (D) netstat
πŸ’¬ Discuss
βœ… Correct Answer: (A) hostname
Explanation: 'hostname' prints or sets the system hostname.

Q. Which command is used to display all open network connections?

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

Q. What does the 'chmod 644 file' command do?

  • (A) Sets read/write for owner, read for group and others
  • (B) Sets full permissions for all
  • (C) Removes all permissions
  • (D) Makes the file executable
πŸ’¬ Discuss
βœ… Correct Answer: (A) Sets read/write for owner, read for group and others
Explanation: '644' means rw- for owner, r-- for group and others.

Q. Which command is used to check disk space usage?

  • (A) df -h
  • (B) du -h
  • (C) lsblk
  • (D) mount
πŸ’¬ Discuss
βœ… Correct Answer: (A) df -h
Explanation: 'df -h' shows disk space usage in human-readable format.

Q. How do you list all running services on a system using systemd?

  • (A) systemctl list-units --type=service
  • (B) service --status-all
  • (C) chkconfig --list
  • (D) initctl list
πŸ’¬ Discuss
βœ… Correct Answer: (A) systemctl list-units --type=service
Explanation: 'systemctl' is used with systemd to manage services.

Q. Which command is used to download files from the internet via command line?

  • (A) wget
  • (B) curl
  • (C) Both wget and curl
  • (D) fetch
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both wget and curl
Explanation: 'wget' and 'curl' can download files via terminal.