What is a virtual machine?
is a software-based computer that runs inside a physical computer
What is the top-level directory in Linux?
root directory (/)
Which command displays the username of the person currently logged in?
whoami
Which command shows the directory you are currently working in?
pwd
Which command creates an empty file named `notes.txt`?
touch notes.txt
How much RAM is preferred on the host computer for smoother virtual machine performance?
16 GB RAM
Name the three main parts of the Linux file system
superblock, inode area and data blocks
Which command displays the name of the Ubuntu computer?
hostname
Which command lists files and directories, including hidden files?
ls -a
Which command displays the type of a file named `report.txt`?
file report.txt
What is the minimum and recommended virtual disk size for an Ubuntu 24.04 virtual machine?
Minimum: 25 GB
Recommended: 40 GB
What is the inode area?
It is part of the file system stores information about a file, such as its owner, permissions and pointers to its data?
You need to check the Ubuntu distribution version and the running kernel version. Give one command for each.
lsb_release -a
uname -r
You are in `/home/student/Documents` and want to return to your home directory. Which command should you use?
cd ~
Write a command that creates `notes.txt` containing the text `Linux is fun`, replacing any existing content.
echo "Linux is fun" > notes.txt
touch notes.txt
cat > notes.txt
What keyboard shortcut opens a terminal in the default Ubuntu GNOME desktop?
Ctrl + Alt + T
What is the superblock?
The superblock is a part of the Linux file system that stores important information about the file system as a whole.
A student needs to view the computer's IP address information. Which Linux command should they use?
ipaddr
ip a
ifconfig
Write the command to create a directory named `LinuxLab` and, inside it, a subdirectory named `Files`, including any missing parent directories.
mkdir -p LinuxLab/Files
A student wants to add the line `Practice completed` to the end of `notes.txt` without deleting its existing content. Which command should they use?
echo "Practice completed" >> notes.txt`? The `>>` operator appends content.
cat >> notes.txt
Explain the difference between GNOME and Bash in Ubuntu.
GNOME is the desktop environment providing the graphical interface; Bash is a command-line shell that interprets commands.
What is the data block?
A data block in the Linux file system is a section of the disk where the actual contents of a file are stored.
You must create a new user named `student1` and then change that user's password.
Give the two commands, in order, assuming you have administrative privileges.
sudo adduser student1
sudo passwd student1
You must delete an empty directory named `OldLab`. Then explain how the command would differ if the directory contained files and subdirectories.
rmdir OldLab for an empty directory, and
rm -r OldLab for a directory containing contents