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

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

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

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

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

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

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

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

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

6 What is the primary function of the sudo command?

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

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

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

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/group
B. /usr/bin/passwd
C. /etc/shadow
D. /etc/passwd

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. $127$
D. $100$

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

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

13 Which command is used to create a new directory?

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

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

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

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. chgrp
D. chown

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

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

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

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

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

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

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

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

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. create
B. nano
C. touch
D. make

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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. mkgroup
D. groupadd

34 What is the package manager used by Arch Linux?

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

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

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

36 What does the command history do?

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

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. sw
B. cd
C. su
D. user

39 What is the function of the cat command?

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

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

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

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

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

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

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

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

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

44 Which directory contains the device files representing hardware components?

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

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. link
B. alias
C. define
D. export

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

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

48 What does the dpkg command handle?

A. Resolving dependencies
B. Updating the kernel
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. The kernel source code
C. A directory for backup files
D. A user's home folder