Unit 1 - Practice Quiz

CSE325 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 Which of the following components constitutes the core interface between a computer's hardware and its processes in the Linux ecosystem?

A. The Kernel
B. The Desktop Environment
C. The Shell
D. The Bootloader

2 In the Linux Filesystem Hierarchy Standard (FHS), which directory is primarily used for system-wide configuration files?

A. /etc
B. /var
C. /dev
D. /bin

3 Which command is used to display the absolute path of the current working directory?

A. pwd
B. cd
C. path
D. ls

4 Which flag is used with the ls command to view hidden files (files starting with a dot)?

A. -R
B. -a
C. -l
D. -h

5 Which Linux distribution family uses rpm as its low-level package manager?

A. Arch Linux
B. Red Hat
C. Debian
D. Slackware

6 What is the primary function of the sudo command?

A. Update the system software
B. Switch to the root user permanently
C. Execute a command with superuser (or another user's) privileges
D. Suspend the current domain

7 In the context of file permissions, what is the numeric (octal) value of r-x?

A. $4$
B. $5$
C. $7$
D. $6$

8 Which command is used to rename a file or move it to a different directory?

A. rn
B. cp
C. mv
D. rm

9 Which file stores the encrypted user passwords in a modern Linux system?

A. /etc/group
B. /usr/bin/passwd
C. /etc/passwd
D. /etc/shadow

10 Which operator is used to redirect standard output to a file, overwriting the file if it exists?

A. >>
B. |
C. >
D. <

11 What is the PID (Process ID) of the init process or systemd (the first process started by the kernel)?

A. $127$
B. $1$
C. $100$
D. $0$

12 Which command allows you to search for a specific pattern of text within files?

A. grep
B. locate
C. cat
D. find

13 Which command is used to create a new directory?

A. touch
B. mkdir
C. mkfile
D. newdir

14 In Debian-based systems (like Ubuntu), which command updates the local package index?

A. apt update
B. apt install
C. apt upgrade
D. apt search

15 Which character represents the user's home directory in the shell?

A. .
B. /
C. #
D. ~

16 What is the command to change the owner of a file?

A. usermod
B. chmod
C. chown
D. chgrp

17 Which file contains the definition of user groups and their members?

A. /etc/users
B. /etc/shadow
C. /etc/group
D. /var/groups

18 What does the | (pipe) operator do in the command line?

A. Runs a command in the background
B. Redirects output to a file
C. Separates two commands to run sequentially
D. Passes the output of one command as input to another

19 Which command is used to delete a user account and optionally their home directory?

A. userdel
B. users-remove
C. deluser
D. rmuser

20 Which package manager is the modern successor to yum in Fedora and RHEL distributions?

A. pacman
B. apt
C. zypper
D. dnf

21 What is the purpose of the man command?

A. To manage network connections
B. To manually compile code
C. To manage processes
D. To display the manual/documentation pages for commands

22 Which command creates an empty file or updates the timestamp of an existing file?

A. nano
B. create
C. touch
D. make

23 When using chmod, what does the permission set 755 represent?

A. User: Read/Exec; Group: Read/Exec; Others: Read/Exec
B. User: Read/Write/Exec; Group: Read/Write; Others: Read/Write
C. User: Read/Write; Group: Read; Others: Read
D. User: Read/Write/Exec; Group: Read/Exec; Others: Read/Exec

24 Which directory typically contains variable data files such as logs (/log), mail, and print spools?

A. /tmp
B. /var
C. /proc
D. /opt

25 Which command allows a user to change their own password?

A. pwd
B. usermod
C. passwd
D. chpass

26 What is the User ID (UID) of the root user?

A. $0$
B. $1000$
C.
D. $1$

27 Which command displays the last few lines of a file?

A. tail
B. bottom
C. head
D. less

28 Which symbol is used as a wildcard to represent any number of characters in a filename?

A. %
B. $
C. *
D. ?

29 In the command ls -l > filelist.txt, what is filelist.txt?

A. A command argument
B. The standard error destination
C. An input file
D. The destination file for standard output

30 Which of the following is NOT a Debian-based Linux distribution?

A. Kali Linux
B. Ubuntu
C. Linux Mint
D. CentOS

31 Which command is used to create a soft (symbolic) link?

A. ln
B. cp -l
C. link
D. ln -s

32 Which file in the /etc directory defines the mapping of hostnames to IP addresses locally?

A. /etc/hostname
B. /etc/hosts
C. /etc/network
D. /etc/resolv.conf

33 Which command is used to add a new group to the system?

A. addgroup
B. newgroup
C. groupadd
D. mkgroup

34 What is the package manager used by Arch Linux?

A. apt
B. yum
C. pacman
D. emerge

35 Which option in rm allows for the recursive deletion of directories and their contents?

A. -d
B. -r
C. -a
D. -f

36 What does the command history do?

A. Displays file modification history
B. Shows the version history of the kernel
C. Displays a list of previously executed commands
D. Shows the uptime of the system

37 If a user wants to append output to a file without overwriting it, which operator should be used?

A. >>
B. >
C. 2>
D. |

38 Which command allows you to switch to another user account in the terminal?

A. user
B. su
C. sw
D. cd

39 What is the function of the cat command?

A. To categorize files
B. To create a directory
C. To concatenate and display file content
D. To catch errors

40 In the /etc/passwd file, what does the x in the second field represent?

A. The password is stored in /etc/shadow
B. The account is disabled
C. No password is set
D. The user is an admin

41 Which command removes a package on a Debian/Ubuntu system but leaves the configuration files intact?

A. apt remove
B. apt purge
C. apt delete
D. apt erase

42 What is the standard input (stdin) file descriptor number?

A. $1$
B. $3$
C. $0$
D. $2$

43 Which command would you use to verify which shell you are currently using?

A. echo $SHELL
B. ls shell
C. whoami
D. cat /etc/shells

44 Which directory contains the device files representing hardware components?

A. /dev
B. /mnt
C. /media
D. /sys

45 How do you count the number of lines in a file named data.txt?

A. ls -l data.txt
B. wc -l data.txt
C. count data.txt
D. nl data.txt

46 Which command creates a shortcut command or overrides a command with specific options?

A. alias
B. export
C. define
D. link

47 Which command is used to modify the group membership of an existing user?

A. chmod
B. groupmod
C. usermod
D. chgrp

48 What does the dpkg command handle?

A. Updating the kernel
B. Resolving dependencies
C. Installing local .deb files
D. Downloading from repositories

49 If you want to move up one level in the directory tree, which command do you use?

A. cd ~
B. cd ..
C. cd .
D. cd /

50 What is a 'Repository' in Linux package management?

A. A central storage location for software packages
B. A user's home folder
C. A directory for backup files
D. The kernel source code