Set-3 Missingskill Linux MCQ PDF
Document Details
Tags
Summary
This document contains a set of multiple-choice questions (MCQs) about Linux commands and concepts, specifically focusing on topics such as SSH, file permissions, and package management.
Full Transcript
Set-3 Missingskill Linux MCQ 1. Which file is used for public key storage for passwordless SSH login?...
Set-3 Missingskill Linux MCQ 1. Which file is used for public key storage for passwordless SSH login? 16. What does the permission rwxr-x--- correspond to in numbers? A: ~/.ssh/id_rsa C: /etc/ssh/ssh_config A: 750 C: 700 B: ~/.ssh/id_rsa.pub D: /etc/ssh/sshd_config B: 755 D: 777 2. What does ssh-keygen command do? 17. What does the permission r-xr-xr-x correspond to in numbers? A: Generates SSH keys C: Changes ownership of files A: 555 C: 744 B: Generates password hash D: Configures network interface B: 750 D: 777 3. Which of the following permissions represent rwxr-xr-- for a file? 18. What permission does chmod 640 set? A: Owner: full, Group: read, execute, Others: read C: Owner: read, write, Group: execute, Others: A: Read, write for owner, read-only for group C: Read-only for all B: Owner: read, write, Group: write, Others: none none B: Full access for everyone D: Owner can read and write, group can execute D: Owner: read, execute, Group: read, Others: none 4. How do you change file permission to rwxr-x--- using chmod? 19. Which command installs a package using apt package manager? A: chmod 750 filename C: chmod 755 filename A: apt install package_name C: yum install package_name B: chmod 640 filename D: chmod 710 filename B: apt-get install package_name D: rpm -i package_name 5. How do you move to the top of the file in Normal mode? 20. Which file stores the private key for SSH authentication? A: gg C: H A: ~/.ssh/id_rsa.pub C: /etc/ssh/ssh_config B: G D: L B: ~/.ssh/id_rsa D: ~/.ssh/authorized_keys 6. Which file is commonly used to configure SSH for passwordless login on the client? 21. Start a new /bin/bash session with ssh-agent running? A: authorized_keys C: ssh_config A: ssh-agent /bin/bash C: ssh-agent --new-bash B: known_hosts D: sshd_config B: /bin/bash --agent D: ssh-keygen /bin/bash 7. Which command is used to generate SSH keys for passwordless login? 22. Which option with chmod allows adding execute permission for the group? A: ssh-keygen C: ssh -p A: chmod g+x filename C: chmod o+x filename B: ssh-copy-id D: ssh -t B: chmod u+x filename D: chmod a+x filename 8. To change ownership of a file to user1 and group to group1, which command should 23. Which key combination is used to exit ssh session? be used? A: Ctrl+X C: Ctrl+Shift+X A: chown user1 filename C: chgrp user1 filename B: Ctrl+C D: exit B: chown user1:group1 filename D: chmod user1:group1 filename 9. How do you give execute permissions only to the owner of a file? 24. What permission set allows full access to the owner, and read and execute to both A: chmod u+x filename C: chmod u-x filename group and others? B: chmod o+x filename D: chmod g+x filename A: chmod 755 C: chmod 777 B: chmod 644 D: chmod 700 10. What command shows the current user’s shell environment? 25. What command changes ownership of a file to both user and group? A: echo $PATH C: echo $SHELL A: chown user1 filename C: chmod user1 filename B: echo $HOME D: echo $USER B: chown user1:group1 filename D: usermod user1 11. Which command is used to undo the last action in Vim? 26. Which environment variable is used to define the directories where executable files A: u C: undo are located? B: ctrl+z D: r A: $SHELL C: $USER B: $PATH D: $HOME 12. What is the default permission mode for directories created by mkdir without specifying 27. How do you generate a new SSH key pair? a mode? A: ssh -keygen C: ssh-add A: 777 C: 644 B: ssh-keygen D: ssh-copy-id B: 755 D: 700 13. Which environment variable holds the home directory of the current user? 28. What command is used to create a new group? A: $SHELL C: $HOME A: groupadd C: newgroup B: $PATH D: $USER B: useradd D: addgroup 14. Which permission set allows only the owner to read and write, while the group can 29. Which command is used to save changes in a file? read, and others have no access? A: :w C: :q A: chmod 640 filename C: chmod 760 filename B: :s D: :x B: chmod 740 filename D: chmod 420 filename 15. How do you create a new user with the username john? 30. What command allows switching between users? A: newuser john C: usermod john A: sudo C: useradd B: useradd john D: adduser john B: su D: passwd Set-3 Missingskill Linux MCQ 31. Which key is needed for passwordless SSH login on the server side? 46. Which permission set allows full access to the owner, and read-only access to both A: id_rsa.pub C: ~/.bashrc group and others? B: id_rsa D: known_hosts A: chmod 755 C: chmod 644 B: chmod 744 D: chmod 766 32. Which permission allows only reading by the group and others? 47. What does id_rsa file contain? A: chmod 444 C: chmod 755 A: SSH private key C: SSH authorized key B: chmod 644 D: chmod 555 B: SSH public key D: SSH known hosts 33. How do you add a user to a group sudo? 48. What does the permission rwxr-xr-- correspond to in numbers? A: adduser user sudo C: groupadd sudo user A: 754 C: 744 B: usermod -aG sudo user D: useradd -G sudo user B: 755 D: 745 34. Which package manager is used in Ubuntu? 49. Which of the following gives read (r) and write (w) permissions to the owner, and A: yum C: apt read-only to group and others? B: rpm D: brew A: 755 C: 600 B: 644 D: 654 35. What is the purpose of chmod +x filename? 50. What is the meaning of r--r--r-- in terms of permissions? A: Adds read permission C: Adds write permission A: 600 C: 444 B: Adds execute permission D: Adds delete permission B: 777 D: 400 36. Which file is read for user-specific environment variables and configurations in Bash? 51. What permission does chmod 700 set? A: ~/.bashrc C: /etc/profile A: Full access for everyone C: Read and write for owner only B: /etc/bash.bashrc D: /etc/shell B: Full access for owner, none for group, others D: Execute access only 37. What is the effect of running chmod 700 on a directory? 52. If a file has the permission code 755, what does this mean? A: Gives full access to all users C: Makes the directory executable A: Full permissions for owner, read and execute C: Read and write for owner only B: Restricts access to owner only D: Allows read access only for group, others D: Full permissions for owner, group B: No permissions for anyone 38. How do you check which shell is currently being used? 53. What does the permission rw-r--r-- correspond to in numbers? A: echo $SHELL C: echo $USER A: 777 C: 644 B: echo $PATH D: echo $HOME B: 755 D: 700 39. Which option can be used to give only read and execute permissions to the owner? 54. What does chmod 600 mean? A: chmod 500 C: chmod 100 A: Full access for owner C: Read-only for everyone B: chmod 5000 D: chmod 555 B: Read and execute for owner, no others D: Owner can read and write, others cannot 40. Which command is used to set file permissions recursively? 55. What permission does chmod 555 give? A: chmod -R C: chown -R A: Read and write for owner, no others C: Full access for everyone B: chmod -f D: chown -f B: Read and execute for everyone D: Execute for everyone 41. What does chmod 775 mean? 56. What does chmod 644 mean? A: Owner: rwx, Group: rwx, Others: rx C: Owner: rwx, Group: rw, Others: x A: Owner can read and write, others can only read C: No permissions for anyone B: Owner: rw, Group: rwx, Others: rw D: Owner: rw, Group: rwx, Others: x B: Full access for owner, group can execute D: Group and others can read, write 42. How do you view currently logged in users? 57. What does chmod 744 mean? A: who C: whoami A: Full access for the owner, read-only for others C: Read and write for the owner B: users D: logname B: No permissions for anyone D: Read and execute for everyone 43. What is the significance of chmod 777? 58. What does chmod 666 grant? A: Full permissions for owner C: Read-only for all A: Read-only for all C: Execute-only for all B: Full permissions for all D: No permissions for all B: Read and write for all D: No permissions 44. What does chmod 600 mean for a file? 59. If a file has rwxrwxr--, what permission does it have? A: Read/write for owner, no access for group and C: Full access to group A: 774 C: 770 others D: Read-only for all B: 776 D: 766 B: Read/write/execute for all 45. Which command is used to force quit Vim without saving? 60. What does chmod 711 mean? A: :q C: :wq! A: Full access for owner, others can execute C: Owner can execute, others can read B: :q! D: :f B: Full access for everyone D: No permissions for anyone