Linux Command Line Basics MCQs with Answers and Explanations

Practice Linux Command Line Basics MCQs. from DevOps subject. with solved answers and explanations. updated syllabus-based questions.

Search MCQs, Papers, Topics

Loading MCQs...
AI easy

Question 1: What is the function of the `grep` command in Linux?

grep searches for specified text patterns within files or output streams. It is widely used in DevOps for filtering logs, searching configuration files, and processing command output in shell scripts.

Grep Linux Command Line Text Search Devops
AI easy

Question 2: Which Linux command is used to change file permissions?

chmod (change mode) is used in Linux to change the read, write, and execute permissions of files and directories. chown changes ownership, while chgrp changes group ownership.

Linux Chmod Permissions Command Line Devops
AI medium

Question 3: What is the purpose of `ssh-keygen` in Linux?

ssh-keygen generates SSH key pairs (public and private) used for secure, passwordless authentication to remote servers. The public key is placed on the remote server while the private key stays local.

Ssh Keygen Ssh Linux Security Devops
AI easy

Question 4: Which Linux command is used to check disk usage of a directory?

The du (disk usage) command in Linux is used to estimate and display the disk space used by files and directories. df shows overall filesystem usage.

Linux Disk Usage Du Command Line Devops
AI easy

Question 5: Which command in Linux is used to display running processes?

ps aux displays all currently running processes with details like PID, CPU, and memory usage. The top command provides a real-time dynamic view of running processes.

Linux Top Processes Command Line Monitoring

Showing 1 to 5 of 5 results