Font size
WorksheetsLinux - Up to Disk Partition (Assesment)
Total questions: 53
Worksheet time: 57mins
What is the default file system for most Linux distributions?
NTFS
ext4
FAT32
HFS+
Which of the following commands is used to create a directory in Linux?
mkdir
rmdir
ls
touch
Which of these commands is used to display the current working directory in Linux?
pwd
cd
dir
ls
Which of the following file systems is used by CentOS 7 by default?
ext4
NTFS
Btrfs
FAT32
Which command is used to change file permissions in Linux?
chmod
chown
ls
mv
What does the ls -l command display?
List of files
Long listing format of files
Detailed file content
Size of files
What is the purpose of the tar command in Linux?
Compress files
Archive files
Uncompress files
Create directories
Which command is used to terminate a Linux session?
exit
logout
shutdown
quit
What is the Linux kernel?
A hardware component
The core of the operating system
A file system
A graphical interface
Which of the following is a Linux text editor?
nano
Notepad
WordPad
Microsoft Word
Which of these commands is used to view the contents of a file in Linux?
cp
mv
cat
touch
In Linux, what command is used to display a list of users currently logged into the system?
who
users
ls
id
What is the function of the fdisk command in Linux?
Manage partitions
View file contents
Display system info
Archive files
Which of the following command is used to compress files using gzip?
zip
gzip
bzip2
unzip
Which of the following is NOT a valid Linux user account type?
Normal user
Root user
System user
Admin user
Which command is used to move or rename files in Linux?
mv
cp
rm
touch
What does the chmod 755 command do?
Sets read and write permissions for the user and read-only for others
Sets full permissions for the user and read and execute permissions for others
Sets read-only permissions for everyone
Sets execute permissions for the user
Which of the following commands is used to display disk usage statistics in Linux?
df
du
ls
fdisk
What is the file extension for a compressed tar archive in Linux?
.tar.gz
.zip
.tar.bz2
.rar
In Linux, what command is used to view all running processes?
ls
ps
top
process
What command is used to display the current system date and time in Linux?
date
time
clock
datetime
What is the purpose of the lsblk command in Linux?
List block devices
List processes
List files
List network interfaces
What does the cat command do when used with a file in Linux?
Copies the file
Displays the content of the file
Creates the file
Deletes the file
What does the grep command do in Linux?
Searches for a pattern in a file
Views a file
Deletes a file
Compresses a file
Which of the following commands is used to check disk space usage on a Linux system?
df
du
lsblk
free
What is the function of the mv command in Linux?
Move or rename files
View files
Compress files
Delete files
Which of the following is a valid partition type in Linux?
Primary
Extended
Logical
All of the above
What command is used to display the list of all mounted file systems in Linux?
mount
df
lsblk
fdisk
What is the default shell used in most Linux distributions?
C shell
Z shell
Bourne-Again Shell (Bash)
Fish shell
Which of the following is used for Logical Volume Management (LVM) in Linux?
fdisk
lvcreate
pvcreate
vgcreate
The command used to list all files in a directory is (a) .
The file system used by most Linux distributions is (a) .
The root user in Linux has the highest level of (a) .
The command to view all mounted file systems is (a) .
In Linux, the (a) command is used to copy files or directories.
The (a) command is used to change the owner of a file.
The Linux file system structure begins with the (a) directory.
The (a) command is used to compress files using the gzip algorithm.
The Linux partitioning tool used for creating and managing partitions is (a) .
The command used to view currently running processes in Linux is (a) .
Create a directory named projects in your home directory. Then, create a text file named notes.txt inside the projects directory.
Write the commands used. (5 Marks)
Using the tar command, create an archive of the projects directory, compress it with gzip, and then uncompress the archive.
Write all the commands used. (5 Marks)
Change the file permissions of a file named file1.txt so that only the user has read and write permissions, and others have no permissions.
Provide the command. (5 Marks)
List all the disk partitions on the system using fdisk.
Write the command used and describe the output. (5 Marks)
Create a new partition on /dev/sdb, format it with the ext4 filesystem, and mount it to the /mnt/data directory. Write the commands used for this task. (5 Marks)
Explain the basic structure of the Linux file system.
What is the purpose of the grep command in Linux, and how would you use it to search for a word in a file? (3 Marks)
What is the significance of the /etc/passwd file in Linux? (3 Marks)
Describe the steps to create a new user and set up a password for that user in Linux. (3 Marks)
What are the different types of partitions available in Linux? Explain each briefly. (3 Marks)
The command rm -rf is used to delete a file or directory and its contents recursively.
True
False
The chmod command is used to change the ownership of a file in Linux.
True
False
The root user in Linux has the highest level of privileges and can perform any administrative task.
True
False
