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 Desktop Environment
B. The Shell
C. The Bootloader
D. The Kernel

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

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

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

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

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

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

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

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

6 What is the primary function of the sudo command?

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

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

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

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

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

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

A. /etc/passwd
B. /usr/bin/passwd
C. /etc/group
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. $1$
B. $0$
C. $100$
D. $127$

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

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

13 Which command is used to create a new directory?

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

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

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

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. chmod
B. chgrp
C. usermod
D. chown

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

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

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

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

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

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

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

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

21 What is the purpose of the man command?

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

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

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

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/Exec; Others: Read/Exec
C. User: Read/Write; Group: Read; Others: Read
D. User: Read/Write/Exec; Group: Read/Write; Others: Read/Write

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

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

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

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

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

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

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

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

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. The destination file for standard output
B. A command argument
C. An input file
D. The standard error destination

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

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

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

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

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

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

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

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

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. -r
B. -f
C. -d
D. -a

36 What does the command history do?

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

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

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

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

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

39 What is the function of the cat command?

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

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

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

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

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

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

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

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

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

44 Which directory contains the device files representing hardware components?

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

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

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

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

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

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

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

48 What does the dpkg command handle?

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

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. The kernel source code
B. A directory for backup files
C. A central storage location for software packages
D. A user's home folder