1Which of the following best describes the core Linux design philosophy regarding the file system?
A.Everything is a process
B.Everything is a file
C.Everything is a database entry
D.Everything is a network socket
Correct Answer: Everything is a file
Explanation:A fundamental concept in Linux is that 'Everything is a file', meaning hardware devices, directories, and sockets are treated as files within the filesystem.
Incorrect! Try again.
2Which command is used to display the manual page for a specific command in Linux?
A.help
B.doc
C.man
D.guide
Correct Answer: man
Explanation:The man command (short for manual) provides detailed documentation for commands, configuration files, and system calls.
Incorrect! Try again.
3To execute a command with superuser (root) privileges while logged in as a standard user, which command should be prefixed to the desired command?
A.su
B.sudo
C.admin
D.root
Correct Answer: sudo
Explanation:The sudo (superuser do) command allows a permitted user to execute a command as the superuser or another user.
Incorrect! Try again.
4Which shell command changes the current working directory to the user's home directory?
A.cd /home
B.cd ~
C.cd ..
D.cd -
Correct Answer: cd ~
Explanation:The tilde ~ represents the current user's home directory. Typing just cd without arguments also achieves this.
Incorrect! Try again.
5Which file contains the system-wide configuration for the sudo command and defines which users can acquire privileges?
A./etc/passwd
B./etc/shadow
C./etc/sudoers
D./etc/group
Correct Answer: /etc/sudoers
Explanation:The /etc/sudoers file controls the privileges for sudo. It should strictly be edited using the visudo command.
Incorrect! Try again.
6Which command is used to create a new user account in Linux?
A.newuser
B.useradd
C.createuser
D.mkuser
Correct Answer: useradd
Explanation:useradd is a low-level utility for creating a new user or updating default new user information.
Incorrect! Try again.
7When deleting a user with userdel, which flag is used to also remove the user's home directory and mail spool?
A.-f
B.-r
C.-d
D.-h
Correct Answer: -r
Explanation:The -r (remove) option ensures that the user's home directory and associated mail spool are deleted along with the account.
Incorrect! Try again.
8Which file stores the encrypted password information for user accounts?
A./etc/passwd
B./etc/security
C./etc/shadow
D./etc/master.passwd
Correct Answer: /etc/shadow
Explanation:While /etc/passwd stores user information, the actual password hashes are stored in /etc/shadow for security reasons, as /etc/shadow is only readable by root.
Incorrect! Try again.
9Which command allows an administrator to modify an existing user account, such as adding them to a supplementary group?
A.usermod
B.useradd
C.groupmod
D.passwd
Correct Answer: usermod
Explanation:usermod allows you to modify a user account. For example, usermod -aG groupname username adds a user to a group.
Incorrect! Try again.
10What is the primary function of the /etc/skel directory?
A.It stores deleted user files
B.It contains system skeleton drivers
C.It contains default files copied to a new user's home directory upon creation
D.It stores temporary skeleton scripts
Correct Answer: It contains default files copied to a new user's home directory upon creation
Explanation:Files in /etc/skel (like .bashrc or .profile) are automatically copied to the home directory of a newly created user.
Incorrect! Try again.
11Which command displays the current user's UID (User ID) and GID (Group ID)?
A.whoami
B.w
C.finger
D.id
Correct Answer: id
Explanation:The id command prints real and effective user and group IDs.
Incorrect! Try again.
12To add a new group to the system, which command is used?
A.groupadd
B.addgroup
C.newgroup
D.mkgroup
Correct Answer: groupadd
Explanation:groupadd creates a new group definition in the system files.
Incorrect! Try again.
13If you wish to lock a user account so they cannot log in, which command would you use?
A.passwd -l
B.usermod -L
C.Either A or B
D.userdel --lock
Correct Answer: Either A or B
Explanation:Both passwd -l username and usermod -L username can be used to lock an account by invalidating the password.
Incorrect! Try again.
14Which directory contains the essential user command binaries available to all users (e.g., ls, cp)?
A./sbin
B./bin
C./boot
D./dev
Correct Answer: /bin
Explanation:The /bin directory (or /usr/bin in modern systems) contains essential user binaries.
Incorrect! Try again.
15What does the permission string drwxr-xr-x indicate?
A.It is a file readable by everyone
B.It is a directory with full permissions for the owner, and read/execute for group and others
C.It is a directory with full permissions for everyone
D.It is a device file
Correct Answer: It is a directory with full permissions for the owner, and read/execute for group and others
Explanation:The d indicates a directory. rwx (7) for owner, r-x (5) for group, and r-x (5) for others.
Incorrect! Try again.
16Which numeric value corresponds to the permission r-x (read and execute)?
17You want to change the owner of a file to john and the group to devs. Which command performs this?
A.chmod john:devs file.txt
B.chown john:devs file.txt
C.chgrp john:devs file.txt
D.chperm john:devs file.txt
Correct Answer: chown john:devs file.txt
Explanation:The chown (change owner) command can change both the owner and the group simultaneously using the user:group syntax.
Incorrect! Try again.
18Which command changes the permissions of a file?
A.chown
B.chgrp
C.chmod
D.umask
Correct Answer: chmod
Explanation:chmod (change mode) is used to change the access permissions of file system objects.
Incorrect! Try again.
19If the umask is set to $022$, what are the default permissions for a newly created file (assuming the base is $666$)?
A.644
B.755
C.600
D.777
Correct Answer: 644
Explanation:Default file base is $666$. (rw-r--r--).
Incorrect! Try again.
20Which special permission bit, when set on a directory, ensures that users can only delete files they own within that directory?
A.SUID
B.SGID
C.Sticky Bit
D.Execute
Correct Answer: Sticky Bit
Explanation:The Sticky Bit (t), often used on /tmp, prevents users from deleting or renaming files owned by other users.
Incorrect! Try again.
21What is the numeric representation of the Sticky Bit?
A.4000
B.2000
C.1000
D.0100
Correct Answer: 1000
Explanation:The Sticky bit is represented by the octal value 1 (often added as the fourth digit, e.g., 1777).
Incorrect! Try again.
22What happens when the SGID (Set Group ID) bit is set on a directory?
A.Files created inside inherit the owner of the directory
B.Files created inside inherit the group of the directory
C.The directory cannot be deleted
D.Scripts run inside run as root
Correct Answer: Files created inside inherit the group of the directory
Explanation:SGID on a directory forces new files created within it to inherit the group ownership of the directory rather than the user's primary group.
Incorrect! Try again.
23Which command allows you to view the absolute path of the current directory?
A.ls
B.pwd
C.cd
D.whereis
Correct Answer: pwd
Explanation:pwd stands for Print Working Directory.
Incorrect! Try again.
24Which partition table type is required for drives larger than 2TB and supports more than 4 primary partitions?
A.MBR
B.GPT
C.FAT32
D.LVM
Correct Answer: GPT
Explanation:GUID Partition Table (GPT) overcomes the limitations of the Master Boot Record (MBR), supporting larger drives and unlimited partitions (OS dependent).
Incorrect! Try again.
25Which command is used to manipulate MBR partition tables?
A.gdisk
B.fdisk
C.mkfs
D.mount
Correct Answer: fdisk
Explanation:fdisk is the traditional utility for MBR partition tables. gdisk is used for GPT.
Incorrect! Try again.
26In Linux device naming, what does /dev/sda typically represent?
A.The first SATA/SCSI hard drive
B.The sound card
C.The first partition on the first drive
D.The CD-ROM drive
Correct Answer: The first SATA/SCSI hard drive
Explanation:/dev/sd indicates a SCSI/SATA drive. a indicates it is the first disk detected.
Incorrect! Try again.
27Before a Logical Volume (LV) can be created in LVM, which of the following must be created first?
A.Volume Group (VG)
B.File System
C.Mount Point
D.Swap Space
Correct Answer: Volume Group (VG)
Explanation:The LVM hierarchy is Physical Volume (PV) Volume Group (VG) Logical Volume (LV).
Incorrect! Try again.
28Which command initializes a physical disk or partition for use by LVM?
A.vgcreate
B.lvcreate
C.pvcreate
D.lvm init
Correct Answer: pvcreate
Explanation:pvcreate initializes a Physical Volume (PV) for use by LVM.
Incorrect! Try again.
29Which command creates a specific file system (formats) on a partition?
A.fdisk
B.mount
C.mkfs
D.dd
Correct Answer: mkfs
Explanation:mkfs (make file system) is the front-end tool used to format a partition (e.g., mkfs.ext4, mkfs.xfs).
Incorrect! Try again.
30Which command makes a file system accessible at a specific location in the directory tree?
A.boot
B.load
C.mount
D.attach
Correct Answer: mount
Explanation:The mount command attaches a filesystem found on a device to the big file tree.
Incorrect! Try again.
31To ensure a file system mounts automatically after a reboot, which file must be edited?
A./etc/mtab
B./etc/fstab
C./etc/mounts
D./etc/partitions
Correct Answer: /etc/fstab
Explanation:The /etc/fstab (file system table) file contains static information about the file systems to be mounted at boot.
Explanation:7 (4+2+1) is rwx. 5 (4+1) is r-x. 0 is ---.
Incorrect! Try again.
33Which command displays disk usage by directory?
A.df
B.du
C.ls
D.top
Correct Answer: du
Explanation:du stands for Disk Usage. It estimates file space usage.
Incorrect! Try again.
34Which command reports file system disk space usage (free and used space on mounted filesystems)?
A.df
B.du
C.free
D.mem
Correct Answer: df
Explanation:df (disk free) displays the amount of available disk space for file systems.
Incorrect! Try again.
35If a user tries to edit a file and receives 'Permission Denied', which of the following is the most likely cause?
A.The file system is full
B.The user does not have write permission on the file
C.The file is a directory
D.The user is root
Correct Answer: The user does not have write permission on the file
Explanation:'Permission Denied' specifically indicates that the current user lacks the necessary read, write, or execute bit required for the operation.
Incorrect! Try again.
36What is the purpose of the SUID (Set User ID) bit on an executable file?
A.It prevents the file from being deleted
B.It executes the file with the permissions of the file owner, not the user running it
C.It executes the file with root permissions always
D.It allows the file to be shared via network
Correct Answer: It executes the file with the permissions of the file owner, not the user running it
Explanation:SUID allows a standard user to run an executable with the permissions of the executable's owner (often root, e.g., the passwd command).
Incorrect! Try again.
37Which command is used to rename a file or directory?
A.rn
B.ren
C.mv
D.cp
Correct Answer: mv
Explanation:In Linux, renaming is treated as 'moving' a file from one name to another. The mv command is used.
Incorrect! Try again.
38What does the symbol .. represent in a file path?
A.Current directory
B.Root directory
C.Parent directory
D.Home directory
Correct Answer: Parent directory
Explanation:.. refers to the directory immediately above the current one.
Incorrect! Try again.
39Which command is used to change the group ownership of a file?
A.chown
B.chgrp
C.chmod
D.groupmod
Correct Answer: chgrp
Explanation:While chown can do this, chgrp is specifically designed to change the group ownership of a file.
Incorrect! Try again.
40Which file defines the password aging policies (min/max days, warning period) for users?
A./etc/passwd
B./etc/shadow
C./etc/login.defs
D./etc/profile
Correct Answer: /etc/login.defs
Explanation:/etc/login.defs contains configuration for the shadow password suite, including default password aging limits.
Incorrect! Try again.
41How do you apply changes made to /etc/fstab without rebooting?
A.mount -a
B.remount
C.fstab -u
D.init 6
Correct Answer: mount -a
Explanation:mount -a mounts all filesystems mentioned in /etc/fstab that are not already mounted.
Incorrect! Try again.
42Which command is used to remove a directory that is NOT empty?
A.rmdir
B.rm -r
C.del
D.erase
Correct Answer: rm -r
Explanation:rmdir only removes empty directories. rm -r (recursive) removes a directory and its contents.
Incorrect! Try again.
43In the context of ls -l, what does the character l at the beginning of the permission string (e.g., lrwxrwxrwx) indicate?
A.Log file
B.List
C.Symbolic Link
D.Loopback device
Correct Answer: Symbolic Link
Explanation:The first character indicates file type. l stands for a symbolic link.
Incorrect! Try again.
44Which command allows you to view the groups a specific user belongs to?
A.groups username
B.who username
C.lsgroup username
D.cat /etc/group
Correct Answer: groups username
Explanation:The groups command displays the group memberships for a specified user.
Incorrect! Try again.
45What is the purpose of the fsck command?
A.File System Create
B.File System Check and Repair
C.File System Kill
D.File System Copy
Correct Answer: File System Check and Repair
Explanation:fsck is used to check and repair the integrity of a file system (usually done when the filesystem is unmounted).
Incorrect! Try again.
46When configuring a new user profile, which file is executed specifically when a login shell is started?
A..bashrc
B..bash_profile
C..bash_logout
D..inputrc
Correct Answer: .bash_profile
Explanation:.bash_profile (or .profile) is read for login shells, whereas .bashrc is read for non-login interactive shells.
Incorrect! Try again.
47Which command would you use to extend a Logical Volume named lv_data by 10GB?