Notification texts go here Contact Us Buy Now!

Linux for DevOps

Code with VDK

 Multiple-choice questions based on Linux for DevOps


1. What command is used to display the contents of a file in Linux?

   A) ls

   B) cat

   C) pwd

   D) grep

   Answer: B) cat


2. Which command is used to list all files including hidden files in a directory?

   A) ls

   B) dir

   C) list

   D) ll

  Answer: D) ll


3. Which command is used to search for a specific string in files?

   A) grep

   B) find

   C) search

   D) locate

   Answer: A) grep


4. What command is used to display the current working directory?

   A) cd

   B) pwd

   C) dir

   D) ls

 Answer: B) pwd


5. Which command is used to change permissions of a file in Linux?

   A) chmod

   B) chown

   C) chgrp

   D) perm

  Answer: A) chmod


6. What command is used to create a new directory in Linux?

   A) md

   B) mkdir

   C) newdir

   D) touch

   Answer: B) mkdir


7. Which command is used to display the manual of other commands in Linux?

   A) help

   B) man

   C) info

   D) manual

  Answer: B) man


8. What command is used to copy files or directories in Linux?

   A) cp

   B) mv

   C) copy

   D) scp

  Answer: A) cp


9. Which command is used to remove files or directories in Linux?

   A) rm

   B) del

   C) erase

   D) remove

Answer: A) rm


10. What command is used to find out the disk usage of files and directories?

    A) du

    B) df

    C) dusage

    D) disk

Answer: A) du


11. Which command is used to change the current user's password in Linux?

    A) passwd

    B) pass

    C) chpass

    D) setpass

Answer: A) passwd


12. What command is used to display the last few lines of a file in Linux?

    A) head

    B) tail

    C) last

    D) view

    Answer: B) tail


13. Which command is used to list all currently running processes in Linux?

    A) ps

    B) proc

    C) top

    D) lsproc

  Answer: A) ps


14. What command is used to compress files or directories in Linux?

    A) zip

    B) compress

    C) gzip

    D) tar

 Answer: C) gzip


15. Which command is used to display the IP address configuration of all network interfaces?

    A) ip

    B) ifconfig

    C) netstat

    D) ifip

 Answer: B) ifconfig


16. What command is used to schedule tasks to run periodically in Linux?

    A) cron

    B) task

    C) timer

    D) schedule

Answer: A) cron


17. Which command is used to install packages in Debian-based Linux distributions?

    A) yum

    B) apt-get

    C) pkg

    D) install

Answer: B) apt-get


18. What command is used to list all environment variables in Linux?

    A) env

    B) set

    C) showenv

    D) vars

Answer: A) env


19. Which command is used to display the routing table in Linux?

    A) route

    B) ifconfig

    C) netstat

    D) routeinfo

 Answer: A) route


20. What command is used to kill a process in Linux by its process ID (PID)?

    A) kill

    B) stop

    C) end

    D) terminate

Answer: A) kill


21. Which command is used to create symbolic links in Linux?

    A) ln

    B) link

    C) sym

    D) sl

Answer: A) ln


22. What command is used to display the version of the Linux kernel?

    A) kernel

    B) uname

    C) version

    D) sysinfo

  Answer: B) uname


23. Which command is used to view a file in hexadecimal format in Linux?

    A) hex

    B) hview

    C) xxd

    D) hexview

Answer: C) xxd


24. What command is used to monitor real-time system performance in Linux?

    A) top

    B) perf

    C) monitor

    D) ps

  Answer: A) top


25. Which command is used to display information about currently mounted file systems?

    A) mount

    B) df

    C) fstab

    D) mounted

  Answer: B) df


26. What command is used to set up a secure shell (SSH) connection to a remote server?

    A) ssh

    B) secure

    C) connect

    D) shell

 Answer: A) ssh


27. Which command is used to find files in Linux based on various criteria?

    A) find

    B) search

    C) locate

    D) grep

  Answer: A) find


28. What command is used to check the status of a service in Linux?

    A) service

    B) status

    C) check

    D) systemctl

 Answer: D) systemctl


29. Which command is used to display information about the CPU in Linux?

    A) cpuinfo

    B) processor

    C) lscpu

    D) cpustat

Answer: C) lscpu


30. What command is used to change the owner of a file or directory in Linux?

    A) chown

    B) chmod

    C) own

    D) user

 Answer: A) chown



-Code With VDK

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.