Ge-161l Ict Lab-02
Ge-161l Ict Lab-02
Ge-161l Ict Lab-02
Laboratory 02
Version: 1.0.0
Contents:
• Learning Objectives
• Required Resources
• General Instructions
• Background and Overview
o Microsoft ® Disk Operating System (MS-DOS)
o What is the Command Prompt?
o Why we are using Command Prompt?
o Batch Program
• Activities
o Pre-Lab Activity
▪ Command Line Interface
• Accessing Command Line Interface
• Listing common Commands
• Getting help about a Specific Commands
▪ Directories and Files
• Listing and Changing Directories
• Making Directories
• Changing multiple steps directories
• Searching next directory with tab (Auto-Complete)
• Using relative path to go directory
• Clearing Screen
• Listing the file with a specific extension
• Deleting a directory
• Copying Files
• Renaming Files
• Deleting Files
▪ Batch Program
• Creating a Batch file
• Executing a Batch file
• Writing First Batch Script/Program
o In-Lab Activities:
▪ Task 01: Command Line Interface
▪ Task 02: Creating Directory Hierarchy
▪ Task 03: Writing a Batch Program
o Post-Lab Activities:
▪ Task 01: Installation of Oracle ® VirtualBox Virtual Machine
▪ Task 02: Installation of Ubuntu variant of Linux Operating System
• Submissions
• Evaluations Metric
• References and Additional Material
• Lab Time and Activity Simulation Log
Learning Objectives:
• Use Windows Command Prompt for various command (go to the directory, make directory,
remove directory, list directory, …)
• Write and execute a batch program
• Install Oracle ® VirtualBox Virtual Machine
• Install Ubuntu variant of Linux Operating System
Resources Required:
• Laptop or Desktop Computer
• Internet Access
• Oracle ® VirtualBox Setup
• Ubuntu Setup
General Instructions:
• This is an individual lab, you are strictly NOT allowed to discuss your solution with your
fellow colleagues, even not allowed asking how is he/she is doing, it may result in negative
marking. You can ONLY discuss with your TAs or with me.
• Your TAs will be available in lab for your help. Alternatively, you can send me your queries
via email.
Teachers:
Course Instructor Prof. Dr. Syed Waqar ul Qounain [email protected]
Activities:
Pre-Lab Activity:
Task 01: Using Windows Command Line Interface: [Estimated 30 minutes / 30 Marks]
Accessing Command Line Interface:
There are a few ways to access the Command Line Interface (Command Prompt) in Windows. Below
are the most convenient:
1. Type "command prompt" into the Start menu to search for it. You can also type "cmd"
(the short name of the executable that runs the Command Prompt) if you prefer.
2. Press Win + R to open the Run box, then type "cmd" and press Enter to open it.
3. Press Win + X (or right-click the Start button) and choose Command Prompt from the
menu. Depending on your Windows settings, this may show Windows PowerShell
instead. PowerShell is more powerful than the Command Prompt, but can run all the same
commands.
You'll then see a line like the below:
C:\Users\Username>
Here Username would be replaced by current user’s login name at Windows operating system. In
following screens user “Waqar” is logged in the system. Hence you will see similar screen as follows.
You can see contents of the same directory using Graphical User Interface of Microsoft ® Windows
through Windows Explorer as follows.
It's important to know that when working in the Command Prompt, you must type commands exactly
as they should be. Since you're issuing commands directly to your computer, it won't understand if you
type something wrong.
If you type a command that your computer doesn't recognize like “abcdef”, you'll see a message that
says [Command] is not recognized... and Windows won't do anything.
To clear screen we have to enter command “cls”. It will screen whole command prompt screen.
C:\Users\Waqar>cls
Here writing complete path starting from drives (C:\) to desired directory is call absolute path. The
same command can be executed using relative path as follows
C:\Windows>copy notepad.exe ..\Users\Waqar\Desktop
Here as we are already in C:\Windows folder hence we can omit “C:\Windows” from
“C:\Windows\notepad.exe”. To access the absolute destination “C:\Users\Waqar\Desktop” from our
current working location relatively, we will first move one directory up using “..\” and then from there
we will locate your desired destination which is “Users\Waqar\Desktop”. Hence then complete
relative path would become as ..\Users\Waqar\Desktop
The following message appears:
To rename the NOTEPAD.EXE file to PADNOTE.TXT, type the following at the command prompt:
C:\Users\Waqar\Desktop>ren notpad.exe padnote.txt
Rem This is for listing down all the files in the directory Program files
In-Lab Activities:
Task 01: Using Command [30 minutes / 25 marks]
Write the syntax and function of the following commands at Windows command line interface. Also
attach the screenshot after running these on your computer. (Capture full terminal screen)
1. help
2. dir
3. dir /a
4. cd
5. cd ..
6. cd <directory_name>
7. mkdir
8. rmdir
9. echo
10. tree
Post-Lab Activities:
Task 01: Installation of Oracle ® VirtualBox Virtual Machine [Time 30 mins/ 10 marks]
Open your Browser.
Search “virtualbox”.
Task 02: Installation of Ubuntu variant of Linux Operating System [Time 30mins / 10 marks]
Search “Ubuntu” on Google.
Submissions:
• For Pre-Lab Activity:
o Perform Pre-Lab as mentioned above.
o Take screenshot of each step, (by name screenshot1.png screenshot2.png …) and make
a folder on Desktop by name “RollNo_Pre-Lab_02”.
o Save screenshots in folder “RollNo_Pre-Lab_02”.
o Then zip whole folder (RollNo_Pre-Lab_02.zip), and email to your respective TA.
• For In-Lab:
o Perform mentioned tasks of In-Lab activity.
o Make a folder on Desktop by name “RollNo_In-Lab_02”.
o Take screenshot of each and save in folder “RollNo_In-Lab_02”.
• For Post-Lab:
o Perform mentioned tasks of Post-Lab activity.
o Make a folder on Desktop by name “RollNo_Post-Lab_02”.
o Take screenshot of each and save in folder “RollNo_Post-Lab_02”.
o Then zip whole folder (RollNo_Post-Lab_02.zip), and email to your respective TA.
Evaluations Metric:
• All the Pre-Lab and Post-Lab tasks will be evaluated offline by TA’s. In-Lab tasks would be
evaluated in the Lab.
• Division of Pre-Lab marks: [30 marks]
o Task 01 Using Command Prompt [20 marks]
o Full Terminal Screenshots [05 marks]
o Naming convention RollNo_PreLab_02 [05 marks]
• Division of In-Lab marks: [50 marks]
o Task 01 Running Terminal Commands [25 marks]
o Task 02 Making Hierarchy of Directories [15 marks]
o Task 03 Batch Program [10 marks]
• Division of Post-Lab marks: [20 marks]
o Task 01 Installation of VirtualBox [10 marks]
o Task 02 Installation of Ubuntu Operating System in VirtualBox [10 marks]