Lab 1.1: Introduction to Linux¶
Welcome to your first hands-on lab in the module!
This session is designed to give you a solid start with Linux fundamentals and basic Cloud VM interaction.
π― What Youβll Learn¶
Lab 1 Part 1 focuses on:
- Part A: Connecting to your Virtual Machine (VM) in Google Cloud Platform
- Part B: Running Linux commands via the Command Line Interface (CLI)
Note
Todayβs lab session sets the foundation for your next 10 weeks of Cloud Computing work.
Please complete all the steps before the next class.
π§ How to Approach This Lab¶
The labs are written as step-by-step tutorials β follow them carefully.
Before you begin
- Watch the Week 0 videos on redeeming your coupon, creating a VM, and connecting with Visual Studio Code.
- Use these labs as an interactive checklist β type every command yourself.
Learning by Doing
- Avoid copyβpaste. Type commands manually to understand what each one does.
- Understanding the CLI (Command Line Interface) is one of the core skills of a computer scientist.
- Donβt worry if you forget β youβll practice the same commands repeatedly.
Optional but highly recommended
Create a GitHub Page or online logbook to note important commands and screenshots.
This will serve as your personal Linux cheat sheet.
π‘ Explore More¶
Want to explore more about the Linux CLI?
π Download the Linux Pocket Guide (3rd Edition)
Warning
Avoid copying commands directly from PDFs β hidden characters (like smart quotes) can break terminal input.
π§© Part A β Preparing Your Workspace¶
- Follow Week 0 instructions to redeem your coupon and create a new VM.
- Start your VM using the same configuration.
Info
Youβll use this VM throughout the lab series β treat it as your personal Cloud workstation.
βοΈ Part B β Deploying a Cloud Application¶
Youβll now learn basic Linux commands on your VM (Ubuntu 18.04) and deploy your first Apache web server.
π Step 1 β Check Your Current Directory¶
Expected output:
Note
pwd stands for print working directory β it shows where you are in the file system.
π€ Step 2 β Create a New User¶
Follow the prompts to create a password and enter user details.
Warning
You wonβt see your password as you type β this is normal in Linux.
β‘ Step 3 β Make yoda a Superuser¶
This gives yoda admin privileges.
π Step 4 β Switch User¶
Youβre now logged in as yoda but still located in your previous home directory.
Move to your new one:
π§Ή Step 5 β Clear the Terminal¶
π Step 6 β List Files¶
The folder is empty. Letβs create something.
π§± Step 7 β Create a Folder and Navigate to It¶
Expected output:
βοΈ Step 8 β Install a Text Editor¶
Note
nano includes pico, a lightweight text editor weβll use here.
π§Ύ Step 9 β Create and Edit a File¶
Paste or type:
Luke Skywalker was a Tatooine farmboy who rose from humble beginnings to become one of the greatest Jedi the galaxy has ever known.
Save: CTRL + S
Exit: CTRL + X
π Step 10 β Create Another File¶
Type:
π Step 11 β View File List¶
Expected output:
total 8
-rw-rw-r-- 1 yoda yoda 131 Jan 9 11:25 luke.txt
-rw-rw-r-- 1 yoda yoda 92 Jan 9 11:30 obi-wan.txt
Tip
Each line shows file permissions, owner, and size.
Both files belong to yoda.
π Step 12 β Copy and Remove Files¶
cp jedi/luke.txt jedi/luke_copy.txt
cp jedi/obi-wan.txt jedi/obi-wan-copy.txt
rm jedi/obi-wan-copy.txt
Use
ls jedito confirm changes.
π§° Step 13 β Common Commands Recap¶
| Command | Purpose |
|---|---|
pwd |
Show directory path |
ls |
List files/folders |
cd testfolder |
Navigate into a folder |
cd .. |
Move up one level |
mkdir |
Create new folder |
pico filename |
Edit text file |
cp a.txt b.txt |
Copy file |
rm a.txt |
Delete file |
ποΈ Step 14 β Copy a Folder¶
Check:
Output:
Then remove it:
π§© Step 15 β Edit a File and View Its Contents¶
Add at the top:
Now view it without opening the editor:
βοΈ Step 16 β Install Apache Web Server¶
Info
Youβll be prompted for your password and to confirm with Y.
Once installed, open your VMβs External IP in your browser β
you should see the Apache2 Default Page.

The default page is stored at
/var/www/html/index.html.
π Step 17 β Create Your First Web Page¶
Paste:
<html>
<head><title>This is a Yoda site!</title></head>
<body>
Hello World! I am Yoda! π§ββοΈ
<p>
<img src="https://cdn.quotesgram.com/img/71/36/1837595163-Yoda-The-Empire-Strikes-Back.jpg">
</p>
</body>
</html>
Save (CTRL S) β Exit (CTRL X)
π¦ Step 18 β Deploy Your Web Page¶
Copy the file to the Apache web directory:
Now visit your VMβs URL:
π Your Yoda site is live!
π Summary¶
| Command | Purpose |
|---|---|
cp -r folderA folderB |
Copy entire folders |
rm -rf folder |
Delete a folder forcefully |
cat file.txt |
View file contents |
sudo apt install package |
Install software |
sudo cp file /var/www/html/ |
Deploy web content |
You Did It!
Youβve successfully completed Lab 1 Part 1.
Youβve learned how to:
- Work with files and folders in Linux
- Create and edit text files
- Install software using the CLI
- Deploy a basic web page on Apache
Now continue to Lab 1 Part 2 π