Linux Reviewer for Finals PDF

Document Details

DeftStrontium

Uploaded by DeftStrontium

Tags

Linux operating system command line interface computer science

Summary

This document is a set of questions about Linux, a popular operating system. It covers various topics relating to Linux such as licenses, distributions, and command-line interfaces. The questions are suitable for final exams in computer science.

Full Transcript

Reviewer for Finals. Introduction to Linux 1. What type of license does Linux use to allow its source code to be freely available and modifiable? Open-source license 2. In Linux terminology, what is a 'distribution'? A bundle of the kernel, tools, and applications 3....

Reviewer for Finals. Introduction to Linux 1. What type of license does Linux use to allow its source code to be freely available and modifiable? Open-source license 2. In Linux terminology, what is a 'distribution'? A bundle of the kernel, tools, and applications 3. What is Linux primarily known as? An operating system kernel 4. What is the name of the organization that certifies operating systems to be officially called UNIX? Open Group 5. Which popular Linux distribution family is known for its 'apt' package manager? Debian 6. Which project contributed many essential tools to Linux, creating a complete operating system? GNU Project 7. What language is Linux primarily written in? C 8. What is one primary advantage of the command line interface (CLI) in Linux? It allows complex tasks with single commands 9. The term "Linux" often refers to the combination of the Linux kernel and what other software? GNU software 10. What is the main benefit of learning the command line for Linux users? It provides portability across distributions 11. Who started the Linux project? Linus Torvalds 12. What was the original name Linus Torvalds gave to his project? Freax 13. Which operating system is a predecessor to Linux and heavily influenced its development? UNIX 14. Which of the following best describes the philosophy of open-source software? Source code is available and modifiable 15. In the context of Linux, what does GUI stand for? Graphical User Interface 16. What is the primary function of an operating system? To manage hardware and software components 17. Which operating system is partially based on FreeBSD? macOS 18. What is the primary concern when upgrading an operating system? backward compatibility 19. What does a "beta" software release indicate? It is under development with new features 20. Which of the following is NOT a major operating system? Solaris 21. What is the role of a server in a computing environment? To serve information to clients 22. What does "LTS" in Linux distributions stand for? Long-Term Support 23. Which Linux distribution is widely used in scientific computing? Scientific Linux 24. What is the release cycle of Windows 10 updates? Twice a year 25. Which of these Linux distributions is community-driven? Debian 26. What is the key difference between GUI and CLI interfaces? GUI uses a mouse; CLI uses commands 27. Which operating system is known for being popular in the creative industry? macOS 28. What is the primary focus of Red Hat Enterprise Linux (RHEL)? Server applications 29. Which package management system is used by Debian?.deb 30. What is backward compatibility in an operating system? Ability to run older software versions 31. What does a Linux distribution package include? The Linux kernel and utilities 32. What type of release does openSUSE Tumbleweed represent? Rolling release 33. Which of the following is an example of an enterprise Linux distribution? SUSE Linux Enterprise Server 34. What is a common use for Raspbian? Education and training 35. What is the main function of a package manager in Linux distributions? Install and manage software 36. Which company develops the Ubuntu distribution? Canonical 37. What is the term for software upgrades no longer being offered by vendors? Maintenance cycle 38. What type of Linux distribution is Fedora considered? Community beta 39. Which operating system integrates closely with iOS devices? macOS 40. What does the CLI terminal pass user input to for execution? Shell 41. What does virtualization allow organizations to do? Pay only for used resources 42. Which Linux distribution is based on Ubuntu but offers proprietary codecs? Linux Mint 43. What is CentOS known for? Red Hat compatibility 44. What is the primary purpose of Microsoft Azure? Cloud services 45. Which organization offers SUSE Linux? Micro Focus Command Line Skills and Manage Files and Directories 1. What does the Bash shell use the ~ symbol for? The user's home directory 2. What is the primary function of command history in Bash? To allow re-execution or editing of previously executed commands 3. What type of variable is lost when the terminal is closed? Local variable 4. What is the purpose of the PATH variable in the Bash shell? To list the directories to search for executable commands 5. Which command lists all files in the /etc/ppp directory? ls /etc/ppp 6. Which of the following is a characteristic of an alias? It maps longer commands to shorter sequences 7. What is the correct syntax to display the value of the HISTSIZE variable? echo $HISTSIZE 8. Which quoting mechanism prevents the shell from interpreting all special characters? Single quotes 9. How does the Bash shell identify a command as an external command? By locating it in the PATH directories 10. What character is used to escape a single special character in Bash? \ 11. Which of the following features is provided by scripting in the Bash shell? Functions and conditional statements 12. What does the type command do in Bash? Shows information about a command 13. What does the ls -l command provide that ls does not? A detailed list of files with permissions and file size 14. Which of the following is a feature of environment variables? They are recreated automatically when a new shell is opened 15. How can the Bash shell's command history be accessed? By typing history in the terminal 16. Which glob character matches a single character in Bash? ? 17. What is the purpose of double quotes in Bash? To prevent the interpretation of some metacharacters 18. Which key combination allows a user to scroll through the Bash command history? Up and Down Arrow keys 19. Which command is an example of command substitution? echo "The date is $(date)" 20. What does the alias command do in Bash? Maps longer commands to shorter sequences 21. What command moves the hosts file to the Videos directory? mv hosts Videos/ 22. What is the difference between * and ? in glob patterns? matches zero or more characters, ? matches one character. 23. Which command lists files in a directory? ls 24. The ~ character in Linux refers to what? The user's home directory. 25. What does the -r option do in the cp command? Copies directories recursively. 26. Which glob pattern matches files with at least one number? /etc/[0-9] 27. Which command lists all hidden files in a directory? ls -a 28. What happens when the cp command is used without any options on a directory? It produces an error. 29. Which command displays the ASCII table in Linux? ascii 30. The pattern /etc/*.??? matches what type of files? All files with three-letter extensions. 31. What symbol represents zero or more characters in a filename pattern? * 32. Which option in the ls command displays only directory names and not their contents? -d 33. What does the -i option do in the cp command? Copies files interactively. 34. Which glob character represents exactly one character? ? 35. What is the output of ls /etc/[!DP]*? Files not starting with D or P. 36. To prevent the ls command from showing directory contents, what option is used? -d 37. What command is used to copy files in Linux? cp 38. What does the -v option do in the cp command? Copies files verbosely. 39. In Linux, file names are case-sensitive. What is true about file naming? hello.txt and HELLO.txt are different files. 40. What happens if you run cp without any options and the destination file already exists? The destination file is overwritten. 41. What does the echo /etc/t* command do? Displays all files starting with "t" in /etc. 42. Which command creates a copy of /etc/hostname as example.txt in the home directory? cp /etc/hostname ~/example.txt 43. Which glob pattern matches files that start with 'a' to 'd'? /etc/[a-d]* 44. What is the purpose of the ! character in glob patterns? Exclude specific characters. 45. Which option in the ls command is used to list detailed file information? -l 46. What is the purpose of the cat command? Display file contents. 47. What is the purpose of the -n option in the cp command? To avoid overwriting files during a copy. 48. To display files in the /etc directory starting with 'r' and ending with.conf, which command is correct? ls /etc/r.conf* 49. What command is used to move a file in Linux? mv 50. Which of the following is true for glob patterns in Linux? Glob patterns are used to match filenames based on patterns. Navigating the File System 1. What is the Linux equivalent of "My Computer" in Windows? Root Directory 2. What does the tilde (~) symbol represent in Linux? A user's home directory 3. Which command is used to display the current directory in Linux? pwd 4. What type of path starts with the / character? Absolute Path 5. Which directory contains user-specific files and directories in Linux? /home 6. What does the command ls / do? Lists files in the root directory 7. How do you navigate to the Documents directory from the current directory using a relative path? cd Documents 8. What does the cd.. command do in Linux? Navigates one directory up (parent directory) 9. What happens when the cd command is used without arguments? The user navigates to their home directory 10. What is the default directory when a user logs into a Linux shell? Home directory 11. Which directory is used for temporary files in Linux? /tmp 12. What does the. (single dot) symbol represent in Linux? Current directory 13. Which directory is often referred to as the parent directory?.. 14. Which command takes you directly to your home directory regardless of your current location? cd 15. What is the command to navigate from /home/sysadmin/Documents/School to /home/sysadmin/Downloads? cd../../Downloads 16. Which directory contains system configuration files in Linux? /etc 17. What command would navigate to /home/sysadmin from the /home/sysadmin/Documents directory using an absolute path? cd /home/sysadmin 18. In Linux, the top-level directory is symbolized by which character? / 19. Which Linux directory contains files to boot the computer? /boot 20. What type of path is../Downloads? Relative Path Creating user and Group Security 51. What command is used to create a new user in Linux? useradd 52. Where is user account information stored in Linux? /etc/passwd 53. What does the groupadd command do? Creates a new group 54. What is the purpose of the /etc/skel directory? To provide default files for a user’s home directory 55. What does the "-r" option in the groupadd command do? Sets a reserved GID for the group 56. Which file contains encrypted user passwords? /etc/shadow 57. What does the -d option in the useradd command specify? Home directory 58. What is the purpose of the usermod command? Modify an existing user account 59. What command is used to delete a user? userdel 60. Which option in the passwd command allows an admin to expire a password? -e 61. What is the default shell assigned to a user if none is specified? /bin/bash 62. What is the UID_MIN setting in the /etc/login.defs file? The minimum UID value for regular users 63. What is the purpose of the -G option in the useradd command? Assigns the user to supplementary groups 64. What is a skeleton directory used for? Copying default files to new user home directories 65. What does the -m option do in the useradd command? Creates a home directory 66. How can a locked user account be unlocked? Both A and B (usermod -U, passwd -u) 67. What command lists all groups on a Linux system? getent group 68. What does the -a option do when used with usermod -G? Appends the user to new groups without removing existing memberships 69. What does the -s option in the useradd command do? Sets the user’s shell 70. What is the significance of the /etc/group file? Stores group membership details 71. Which command changes the primary group of a user? usermod -g 72. What does the userdel -r command do? Deletes a user and their home directory 73. What is the purpose of the /etc/default/useradd file? Sets default values for user accounts 74. What command is used to change the expiration date of a user account? chage -E 75. What is the default value for the expiration date in the useradd command? No expiration 76. What happens if you delete a group using groupdel? Files owned by the group become orphaned 77. What is the minimum password length defined in /etc/login.defs? 5 characters 78. What does the -f option in the useradd command set? Inactive days after password expiration 79. Which file controls password aging for users? /etc/shadow 80. What does the passwd -l command do? Locks a user account System User and Security 1. Identify the primary purpose of user accounts in Linux. Secure access to the system 2. Identify what the su command does by default when no username is specified. Switch to the root account 3. Identify the file that contains user account information in Linux. /etc/passwd 4. Identify the function of the sudo command in Linux. Execute commands with elevated privileges 5. Identify the field in the /etc/passwd file that specifies the user’s home directory. Home directory 6. Identify what the id command displays in Linux. User and group information 7. Identify the Linux distribution that disables the root account by default. Ubuntu 8. Identify what is stored in the /etc/shadow file. Encrypted passwords 9. Identify what a UID of 0 represents. The root account 10. Identify what the who command shows. List of current users 11. Identify the field in /etc/group that indicates the group's ID. GID 12. Identify the command that retrieves user account information. getent 13. Identify what the last command reads from in Linux. /var/log/wtmp 14. Identify what a pseudo-terminal (pts) is used for. Remote logins 15. Identify the command that displays the current system uptime. uptime 16. Identify where group membership for supplemental groups is defined. /etc/group 17. Identify what the grep command does in Linux. Searches for specific text 18. Identify the default shell for most Linux users. /bin/bash 19. Identify the field in /etc/shadow that represents the maximum password age. Maximum 20. Identify the main purpose of the /etc/group file. Store group-related information 21. Identify how to retrieve user account information using getent. getent passwd [username] 22. Identify the primary risk of logging in directly as root. Unrestricted access to the system 23. Identify what the exit command does. Logs out the current user 24. Identify the command that shows secondary group memberships. id -G 25. Identify the purpose of the /etc/gshadow file. Manage group passwords 26. Identify what a value of 99999 in the /etc/shadow file’s maximum field means. Password never expires 27. Identify what the who -b command displays. Boot time 28. Identify what a reserved field in /etc/shadow is used for. Future development 29. Identify how system accounts are identified. UID between 1 and 499 30. Identify what the w command displays that who does not. System uptime Linux File Ownership and Permissions 1. What is the primary purpose of file ownership in Linux? To restrict access to files and directories 2. Who is typically the owner of a newly created file in Linux? The user who created it 3. What command is used to change the ownership of a file in Linux? chown 4. What is the significance of the group ownership of a file? It defines permissions for a group of users 5. Which command displays file ownership and permissions? ls -l 6. What does the "rwx" in Linux permissions represent? Permissions for read, write, execute 7. What symbol represents "no permission" in Linux? - 8. Which command is used to change the group ownership of a file? chgrp 9. What is the octal value for full permissions (rwx)? 777 10. How many permission categories are defined in Linux? Three 11. What does the "chmod 755 file.txt" command do? Grants read, write, execute to owner; read, execute to others 12. Which permission allows a user to execute a file as a program? Execute 13. What is the default permission mask in Linux called? umask 14. What is the effect of "chmod 644 file.txt"? Read and write for owner, read-only for others 15. What does the sticky bit do for a directory? Only allows file owners to delete their own files 16. What is the numeric value for read and write permissions only? 6 17. What is the command to recursively change ownership of a directory and its contents? chown -r 18. Which special permission allows a program to run with the file owner's permissions? Setuid 19. What is the effect of "chmod 000 file.txt"? Removes all permissions for all users 20. What is the purpose of the "lsattr" command? Display file attributes 21. What does the "+" symbol in "ls -l" output indicate? SELinux context or extended ACLs 22. What is a feature of Access Control Lists (ACLs)? They provide fine-grained access control 23. Which command is used to edit Access Control Lists in Linux? setfacl 24. What does "getfacl" do in Linux? Displays ACL information 25. What does the "t" symbol in the permissions of a directory mean? Sticky bit is set 26. What happens if the setgid bit is set on a directory? Files created in the directory inherit the group of the directory 27. What does the "immutable" attribute do to a file in Linux? Prevents modification and deletion 28. What is the effect of "chmod +x script.sh"? Grants execute permissions 29. What is the maximum number of links a file can have in Linux? Depends on the file system 30. Which command displays the permissions of files and directories in octal format? stat

Use Quizgecko on...
Browser
Browser