





























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






























































Question 1. Which component is responsible for managing hardware resources in a Linux system? A) Shell B) Kernel C) Daemon D) Bootloader Answer: B Explanation: The kernel is the core part of the Linux operating system responsible for managing hardware resources and system calls. Question 2. What command would you use to display the contents of the current directory in Linux? A) cd B) ls C) mv D) pwd Answer: B Explanation: The ls command lists the contents of the current directory. Question 3. Which file contains user account information in Linux? A) /etc/shadow B) /etc/passwd C) /etc/group D) /home/user Answer: B Explanation: /etc/passwd stores essential user account information such as username and UID. Question 4. Which command is used to move files or directories in Linux? A) cp B) mv C) rm
D) mkdir Answer: B Explanation: The mv command moves files or directories from one location to another. Question 5. What does the chmod command do? A) Changes file owner B) Changes file permissions C) Changes file group D) Changes file location Answer: B Explanation: chmod modifies the permissions of a file or directory. Question 6. What is the default shell for most Linux distributions? A) csh B) fish C) bash D) tcsh Answer: C Explanation: bash (Bourne Again SHell) is the default shell on most Linux systems. Question 7. Which command is used to create a new empty file in Linux? A) mkdir B) touch C) cp D) rm Answer: B Explanation: touch creates an empty file if it does not exist. Question 8. What symbol is used for output redirection in the Linux shell?
Explanation: /etc/shadow contains hashed user passwords for security. Question 12. Which command lists all running processes? A) ps B) ls C) pwd D) cd Answer: A Explanation: ps displays information about currently running processes. Question 13. What is the purpose of the GRUB bootloader? A) Manage memory B) Start user processes C) Load the operating system kernel D) Create filesystems Answer: C Explanation: GRUB loads the Linux kernel and initiates the boot process. Question 14. Which command is used to delete a directory? A) cp B) mv C) rm - r D) touch Answer: C Explanation: rm - r removes a directory and its contents recursively. Question 15. What does the command ‘chmod 755 file’ set? A) Read-only for all B) rwxr-xr-x permissions
C) Full access for all D) No permissions Answer: B Explanation: 755 sets rwx for owner, r-x for group and others. Question 16. What is a daemon in Linux? A) A text editor B) A background process C) A user account D) A bootloader Answer: B Explanation: A daemon is a background process that runs without user intervention. Question 17. Which command is used to display disk usage? A) df B) du C) ls D) pwd Answer: B Explanation: du shows disk usage of files and directories. Question 18. What does the ‘cp’ command do? A) Change password B) Copy files C) Compress files D) Change permissions Answer: B Explanation: cp is used to copy files or directories.
D) awk Answer: B Explanation: grep searches for patterns within files. Question 23. What does the ‘ps aux’ command show? A) Only user processes B) All running processes C) CPU usage D) Memory usage Answer: B Explanation: ps aux lists all running processes on the system. Question 24. Which file is read at login to set user environment variables? A) /etc/shadow B) ~/.bashrc C) ~/.profile D) /etc/group Answer: C Explanation: ~/.profile sets environment variables at login. Question 25. Which command changes the owner of a file? A) chmod B) chown C) chgrp D) cp Answer: B Explanation: chown changes file owner and optionally group. Question 26. What is the function of the ‘rm’ command?
A) Rename files B) Remove files C) Run memory check D) Run manual Answer: B Explanation: rm deletes files or directories. Question 27. Which command is used to display the first few lines of a file? A) tail B) head C) less D) cat Answer: B Explanation: head shows the first 10 lines of a file by default. Question 28. What does the ‘mkdir’ command do? A) Moves files B) Creates directories C) Removes files D) Changes directory Answer: B Explanation: mkdir creates a new directory. Question 29. What is the purpose of the ‘umask’ command? A) Set file ownership B) Set default permissions C) Set group name D) Set file access time Answer: B
C) Create a user D) Delete a user Answer: B Explanation: passwd changes a user's password. Question 34. The ‘nano’ command is used for: A) File compression B) Text editing C) File deletion D) User management Answer: B Explanation: nano is a simple command-line text editor. Question 35. Which command shows routes and network gateways? A) netstat - r B) ip route C) route D) All of the above Answer: D Explanation: All these commands can display routing tables and gateways. Question 36. Which command is used to kill a running process by PID? A) kill B) ps C) exit D) stop Answer: A Explanation: kill sends signals to processes, including termination signals.
Question 37. Where are global environment variables defined for all users? A) /etc/profile B) ~/.bashrc C) /etc/shadow D) /home/user Answer: A Explanation: /etc/profile sets environment variables for all users. Question 38. Which file lists currently logged-in users? A) /etc/passwd B) /var/log/wtmp C) /etc/group D) /var/log/lastlog Answer: B Explanation: /var/log/wtmp logs logins and logouts. Question 39. Which command displays available disk space? A) df B) du C) ls D) free Answer: A Explanation: df shows available and used disk space on file systems. Question 40. What is the function of the ‘free’ command? A) List files B) Show memory usage C) Free up memory D) List users
B) Create links C) Delete links D) Rename links Answer: B Explanation: ln is used to create hard and symbolic links. Question 45. Which command restarts the system? A) halt B) shutdown - r now C) reboot D) Both B and C Answer: D Explanation: Both shutdown - r now and reboot can restart the system. Question 46. Which file contains group password information? A) /etc/shadow B) /etc/gshadow C) /etc/passwd D) /etc/group Answer: B Explanation: /etc/gshadow stores group password information. Question 47. What does the ‘df - h’ command do? A) Displays disk space in human-readable form B) Deletes files C) Finds files D) Disables filesystems Answer: A Explanation: df - h shows disk usage in a human-readable format.
Question 48. Which command is used to change a user’s group? A) chown B) chgrp C) chmod D) groupmod Answer: B Explanation: chgrp changes the group ownership of a file or directory. Question 49. Which process is the first to start during system boot? A) systemd B) init C) kernel D) grub Answer: D Explanation: grub (bootloader) is the first to start; it then loads the kernel. Question 50. What is the function of ‘systemctl’? A) Start/stop services B) Manage files C) Edit system files D) Display hardware info Answer: A Explanation: systemctl manages systemd services and units. Question 51. The /var/log directory is used for: A) Temporary files B) Log files C) User files
A) Installs software on Red Hat-based systems B) Installs software on Debian-based systems C) Updates the kernel D) Installs user accounts Answer: A Explanation: yum install installs packages on Red Hat-based distributions. Question 56. Which command lists currently mounted filesystems? A) df B) mount C) mnt D) lsblk Answer: B Explanation: mount without arguments lists mounted filesystems. Question 57. What does the ‘history’ command display? A) System logs B) User command history C) Boot history D) Process history Answer: B Explanation: history shows the list of commands previously executed. Question 58. Which command lets you schedule future tasks? A) at B) cron C) Both A and B D) sleep Answer: C
Explanation: Both at and cron can schedule future tasks, with at for one-time and cron for recurring. Question 59. Which file is the main configuration for cron jobs? A) /etc/cron.conf B) /etc/crontab C) /var/log/cron D) /etc/cron.deny Answer: B Explanation: /etc/crontab is the main cron configuration file. Question 60. Which command allows you to search for commands in your PATH? A) where B) which C) whatis D) find Answer: B Explanation: which displays the location of executables in the PATH. Question 61. What is the function of the ‘top’ command? A) Show top files B) Monitor running processes C) Display disk usage D) List users Answer: B Explanation: top provides a real-time view of running processes. Question 62. Which file controls system-wide environment variables? A) /etc/profile B) ~/.bashrc
Question 66. What does the ‘alias’ command do? A) Creates symbolic links B) Creates command shortcuts C) Changes hostname D) Lists users Answer: B Explanation: alias creates shortcuts for commands. Question 67. Which command is used to set the system date and time? A) timedatectl B) time C) setclock D) clockctl Answer: A Explanation: timedatectl manages system time and date. Question 68. What is the function of ‘wget’? A) Download files from the web B) Upload files C) Compress files D) Scan viruses Answer: A Explanation: wget downloads files from internet sources. Question 69. Which command is used to search for files by name using a database? A) locate B) find C) grep D) whereis
Answer: A Explanation: locate uses an indexed database to quickly find files by name. Question 70. Which file contains the default shell for each user? A) /etc/passwd B) /etc/shadow C) /etc/shells D) /etc/group Answer: A Explanation: /etc/passwd includes the default shell for each user. Question 71. What does the ‘export’ command do? A) Exports files B) Sets environment variables C) Exports users D) Exports directories Answer: B Explanation: export sets environment variables for child processes. Question 72. Which command is used to view and set the system hostname? A) hostname B) sethost C) hostctl D) sysname Answer: A Explanation: hostname shows or sets the system’s hostname. Question 73. Which command shows the last system boot time? A) uptime