Docsity

Linux Foundation Certified IT Associate Exam Questions, Exams of Technology

Toggle sidebar
bg1
Linux Foundation Certified IT Associate Exam
Question 1. Which component of Linux is responsible for managing hardware and system resources?
A) Shell
B) Kernel
C) Daemon
D) Bootloader
Answer: B
Explanation: The kernel is the core of the Linux operating system, managing hardware, system
resources, and communication between hardware and software.
Question 2. What is the main function of the Linux shell?
A) Managing hardware
B) Compiling code
C) Interpreting user commands
D) Loading the operating system
Answer: C
Explanation: The shell acts as a command-line interpreter, allowing users to interact with the operating
system by executing commands.
Question 3. Which command lists all files and directories in the current directory, including hidden ones?
A) ls -a
B) ls -l
C) ls -d
D) ls -h
Answer: A
Explanation: The -a option with the ls command shows all files, including those starting with a dot
(hidden files).
Question 4. What does the 'pwd' command do?
A) Changes the current directory
B) Prints the working directory
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46

Partial preview of the text

Download Linux Foundation Certified IT Associate Exam Questions and more Exams Technology in PDF only on Docsity!

Question 1. Which component of Linux is responsible for managing hardware and system resources? A) Shell B) Kernel C) Daemon D) Bootloader Answer: B Explanation: The kernel is the core of the Linux operating system, managing hardware, system resources, and communication between hardware and software. Question 2. What is the main function of the Linux shell? A) Managing hardware B) Compiling code C) Interpreting user commands D) Loading the operating system Answer: C Explanation: The shell acts as a command-line interpreter, allowing users to interact with the operating system by executing commands. Question 3. Which command lists all files and directories in the current directory, including hidden ones? A) ls - a B) ls - l C) ls - d D) ls - h Answer: A Explanation: The - a option with the ls command shows all files, including those starting with a dot (hidden files). Question 4. What does the 'pwd' command do? A) Changes the current directory B) Prints the working directory

C) Lists directory contents D) Creates a new directory Answer: B Explanation: The 'pwd' command prints the full path of the current working directory. Question 5. Which command is used to create a new empty file? A) mkdir B) touch C) cp D) rm Answer: B Explanation: The 'touch' command creates a new empty file or updates the timestamp if the file already exists. Question 6. What does the 'cp' command do? A) Removes a file B) Copies files or directories C) Moves files D) Changes file permissions Answer: B Explanation: The 'cp' command is used to copy files and directories from one location to another. Question 7. Which of the following commands removes a directory and all its contents? A) rmdir B) rm C) rm - r D) del Answer: C Explanation: 'rm - r' recursively deletes a directory and all its files and subdirectories.

D) more Answer: C Explanation: The 'head' command shows the first 10 lines of a file unless specified otherwise. Question 12. How do you display the contents of a file named "file.txt" on the terminal? A) cat file.txt B) show file.txt C) display file.txt D) ls file.txt Answer: A Explanation: The 'cat' command displays the contents of a file. Question 13. What does the command 'grep error logfile.txt' do? A) Finds and deletes 'error' from logfile.txt B) Searches for the word 'error' in logfile.txt C) Replaces 'error' with 'logfile.txt' D) Counts the word 'error' in logfile.txt Answer: B Explanation: 'grep' searches for a pattern (here, 'error') in the specified file. Question 14. Which command is used to search for files and directories? A) search B) grep C) find D) locate Answer: C Explanation: The 'find' command searches for files and directories in a directory hierarchy. Question 15. What does the 'ls - l' command display?

A) Only hidden files B) Detailed list of files and directories C) Only directories D) Only files Answer: B Explanation: 'ls - l' lists files and directories in long format, showing permissions, ownership, size, and modification date. Question 16. How do you change the owner of a file to user 'bob'? A) chown bob file B) chmod bob file C) own bob file D) usermod bob file Answer: A Explanation: The 'chown' command changes the owner of a file or directory. Question 17. Which permission gives the ability to execute a file? A) r B) w C) x D) e Answer: C Explanation: The 'x' permission allows a file to be executed. Question 18. What does the 'ps' command do? A) Prints system configuration B) Displays running processes C) Powers off the system D) Prints current user

B) free C) meminfo D) memory Answer: B Explanation: The 'free' command displays the system’s memory usage. Question 23. What is the function of the 'history' command? A) Shows command history B) Edits system history C) Clears command history D) Backs up files Answer: A Explanation: 'history' displays previously entered commands in the shell. Question 24. Which command provides the manual or help page for a command? A) help B) guide C) man D) info Answer: C Explanation: The 'man' command shows the manual page for other commands. Question 25. Which command is used to compress files using the gzip algorithm? A) zip B) compress C) tar D) gzip Answer: D Explanation: 'gzip' compresses files using the GNU zip algorithm.

Question 26. How do you create an archive file named backup.tar containing the /home/user directory? A) tar - xf backup.tar /home/user B) tar - cvf backup.tar /home/user C) tar - czf backup.tar /home/user D) tar - tvf backup.tar /home/user Answer: B Explanation: 'tar - cvf' creates an archive in tar format; 'c' for create, 'v' for verbose, 'f' for filename. Question 27. What does 'tar - xzvf archive.tar.gz' do? A) Extracts a gzipped tar archive B) Compresses files into tar.gz C) Lists contents of archive D) Deletes the archive Answer: A Explanation: 'tar - xzvf' extracts a tar.gz archive; 'x' for extract, 'z' for gzip, 'v' for verbose, 'f' for filename. Question 28. Where are system logs typically stored in Linux? A) /var/log B) /etc/log C) /home/log D) /usr/log Answer: A Explanation: System logs are generally located in the /var/log directory. Question 29. Which command displays the last 10 lines of a file? A) head B) tail C) less

Question 33. How do you display all listening TCP sockets? A) netstat - l B) netstat - a C) netstat - lt D) netstat - plnt Answer: D Explanation: 'netstat - plnt' shows all listening TCP sockets with process information. Question 34. Which command is recommended for examining sockets on modern Linux systems? A) ifconfig B) ss C) netstat D) netctl Answer: B Explanation: 'ss' is a modern replacement for 'netstat' to display socket statistics. Question 35. What does the /etc/hosts file do? A) Resolves hostnames to IP addresses locally B) Stores user accounts C) Stores DNS servers D) Lists active connections Answer: A Explanation: /etc/hosts maps hostnames to IP addresses for local resolution. Question 36. Which file contains the DNS server addresses for name resolution? A) /etc/dns B) /etc/hosts C) /etc/resolv.conf

D) /etc/network/interfaces Answer: C Explanation: /etc/resolv.conf lists DNS server addresses for the system. Question 37. What is the primary function of the 'sudo' command? A) Switch to another user B) Run commands with elevated privileges C) Edit system files D) Install software Answer: B Explanation: 'sudo' allows a permitted user to execute a command as the superuser or another user. Question 38. Which command adds a new user named "alice"? A) adduser alice B) useradd alice C) newuser alice D) Both A and B Answer: D Explanation: Both 'adduser' and 'useradd' can add new users, though 'adduser' is more user-friendly. Question 39. How do you switch to the root user account? A) su B) root C) sudo root D) switch root Answer: A Explanation: 'su' allows you to switch to the root user (or another user) when the password is known. Question 40. Which file contains user account information?

Explanation: 'groupadd' creates a new group on the system. Question 44. How do you see which groups a user belongs to? A) groups username B) listgroups username C) id username D) Both A and C Answer: D Explanation: Both 'groups' and 'id' commands can be used to see a user's group memberships. Question 45. Which command is used to change the group ownership of a file? A) chgrp B) groupmod C) chown D) Both A and C Answer: D Explanation: Both 'chgrp' and 'chown' can change the group ownership; 'chgrp' is dedicated for group changes. Question 46. What is the effect of 'chmod 755 script.sh'? A) Only owner can execute B) Everyone can read and execute; owner can write C) Only group can write D) File is hidden Answer: B Explanation: 755 gives read/execute to all, write to owner. Question 47. What does the 'umask' command do? A) Sets default permissions for new files

B) Masks users C) Removes files D) Encrypts files Answer: A Explanation: 'umask' sets the default permission mask for newly created files and directories. Question 48. What does 'sudo su' do? A) Runs a command as root B) Switches to root shell with current user's environment C) Switches to root shell with root's environment D) Lists sudo commands Answer: C Explanation: 'sudo su' switches to root shell, inheriting root's environment. Question 49. How do you lock a user account? A) passwd - l username B) lock username C) usermod - L username D) Both A and C Answer: D Explanation: Both 'passwd - l' and 'usermod - L' lock user accounts. Question 50. Which command is used to display a user’s login shell? A) echo $SHELL B) chsh C) grep username /etc/passwd D) Both A and C Answer: D Explanation: Both methods can show a user’s shell; 'echo $SHELL' for the current user, grep for any user.

D) usage Answer: A Explanation: 'du' reports disk usage of files and directories. Question 55. What is the function of the 'mount' command? A) List users B) Attach a filesystem C) Compress files D) Create partitions Answer: B Explanation: 'mount' attaches filesystems to directories in the Linux directory tree. Question 56. Which file lists filesystems to be mounted at boot? A) /etc/fstab B) /etc/mtab C) /etc/filesystem D) /etc/boot.conf Answer: A Explanation: /etc/fstab lists filesystems and mount points for automatic mounting at boot. Question 57. What does the 'umount' command do? A) Unmounts a filesystem B) Updates mount points C) Mounts a filesystem D) Checks disk usage Answer: A Explanation: 'umount' detaches a mounted filesystem. Question 58. Which command is used to display the kernel version?

A) uname - r B) kernel C) version D) kernver Answer: A Explanation: 'uname - r' prints the running kernel version. Question 59. Which command reboots the system immediately? A) halt B) shutdown - r now C) init 1 D) stop Answer: B Explanation: 'shutdown - r now' reboots the system right away. Question 60. What does the 'uptime' command display? A) System running time B) List of users C) System log D) CPU usage Answer: A Explanation: 'uptime' shows how long the system has been running. Question 61. What is the role of the init system in Linux? A) Manage user accounts B) Boot the system and manage services C) Compile software D) Encrypt data Answer: B

C) Process list D) System logs Answer: A Explanation: 'dmesg' shows kernel ring buffer messages, including boot information. Question 66. Which file contains system-wide environment variables? A) /etc/environment B) /etc/profile C) ~/.bashrc D) Both A and B Answer: D Explanation: System-wide environment variables are often set in /etc/environment and /etc/profile. Question 67. What does the PATH environment variable specify? A) User’s home directory B) Directories to search for commands C) System hostname D) Shell prompt Answer: B Explanation: PATH lists directories the shell searches for executable commands. Question 68. What does the export command do? A) Remove variables B) Make variables available to child processes C) Hide variables D) Copy files Answer: B Explanation: 'export' makes shell variables available to child processes.

Question 69. What is the function of the 'alias' command? A) Creates shortcuts for commands B) Changes the prompt C) Sets permissions D) Adds users Answer: A Explanation: 'alias' creates command shortcuts or abbreviations. Question 70. Which symbol is used to run a command in the background? A) & B) $ C) # D) @ Answer: A Explanation: Appending '&' runs a command in the background. Question 71. How do you bring a background job to the foreground? A) fg B) bg C) front D) jobs Answer: A Explanation: 'fg' brings a background job to the foreground. Question 72. What does the 'jobs' command show? A) Background and suspended jobs B) Running processes C) Open files D) User accounts