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

  • (A) Search text patterns in files
  • (B) List directory contents
  • (C) Copy files
  • (D) Change file permissions
πŸ’¬ Discuss
βœ… Correct Answer: (A) Search text patterns in files
Explanation: 'grep' searches for matching patterns in files.

Q. Which command shows memory usage statistics?

  • (A) free -h
  • (B) vmstat
  • (C) top
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above
Explanation: All commands show memory usage in different ways.

Q. Which command creates a new empty file or updates timestamp of an existing file?

  • (A) touch filename
  • (B) cat filename
  • (C) nano filename
  • (D) edit filename
πŸ’¬ Discuss
βœ… Correct Answer: (A) touch filename
Explanation: 'touch' creates empty file or updates timestamps.

Q. What is the default shell in most Linux distributions?

  • (A) bash
  • (B) zsh
  • (C) sh
  • (D) csh
πŸ’¬ Discuss
βœ… Correct Answer: (A) bash
Explanation: bash (Bourne Again Shell) is the default shell in many Linux distros.

Q. Which command is used to check the current working directory?

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

Q. What does the 'ps' command do?

  • (A) Displays currently running processes
  • (B) Shows disk partitions
  • (C) Lists files in directory
  • (D) Monitors network activity
πŸ’¬ Discuss
βœ… Correct Answer: (A) Displays currently running processes
Explanation: 'ps' shows active processes.

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

  • (A) Create shortcuts for commands
  • (B) List all environment variables
  • (C) Show system aliases
  • (D) Remove files
πŸ’¬ Discuss
βœ… Correct Answer: (A) Create shortcuts for commands
Explanation: 'alias' lets users define command shortcuts.

Q. Which file stores the list of services started at boot time?

  • (A) /etc/rc.local
  • (B) /etc/fstab
  • (C) /etc/passwd
  • (D) /etc/hosts
πŸ’¬ Discuss
βœ… Correct Answer: (A) /etc/rc.local
Explanation: /etc/rc.local is a script run at boot for custom commands.

Q. What is the default permission for newly created files?

  • (A) 644
  • (B) 755
  • (C) 777
  • (D) 600
πŸ’¬ Discuss
βœ… Correct Answer: (A) 644
Explanation: Default permission for files is usually 644 (rw-r--r--).

Q. Which command is used to display a calendar in Linux?

  • (A) cal
  • (B) calendar
  • (C) date
  • (D) time
πŸ’¬ Discuss
βœ… Correct Answer: (A) cal
Explanation: 'cal' shows the current month's calendar.