Ubuntu Installation & VMs
The Linux File System
The Linux Terminal
Working with Directories
Working with Files
100

What is a virtual machine?

 is a software-based computer that runs inside a physical computer

100

What is the top-level directory in Linux?

root directory (/)

100

Which command displays the username of the person currently logged in?

whoami

100

Which command shows the directory you are currently working in?

pwd

100

Which command creates an empty file named `notes.txt`?

touch notes.txt

200

How much RAM is preferred on the host computer for smoother virtual machine performance?

16 GB RAM

200

Name the three main parts of the Linux file system

 superblock, inode area and data blocks

200

Which command displays the name of the Ubuntu computer?

hostname

200

Which command lists files and directories, including hidden files?

ls -a

200

Which command displays the type of a file named `report.txt`?

file report.txt

300

What is the minimum and recommended virtual disk size for an Ubuntu 24.04 virtual machine?

Minimum: 25 GB
Recommended: 40 GB

300

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?

300

You need to check the Ubuntu distribution version and the running kernel version. Give one command for each.

lsb_release -a
uname -r

300

You are in `/home/student/Documents` and want to return to your home directory. Which command should you use?

cd ~

300

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

400

What keyboard shortcut opens a terminal in the default Ubuntu GNOME desktop?

Ctrl + Alt + T

400

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.

400

A student needs to view the computer's IP address information. Which Linux command should they use?

ipaddr 

ip a

ifconfig

400

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

400

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

500

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.

500

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.

500

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

500

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

500

A file named `script.sh` must be owned by user `student1`. The owner must have read, write and execute permissions, while the group and others must have read and execute permissions only. Give the two commands.

sudo chown students script.sh and 

chmod 755 script.sh 

The permissions are rwxr-xr-x

M
e
n
u