Operating Systems Lab 1 Manual
Operating Systems Lab 1 Manual
Objectives:
Introduction to Operating Systems (OS):
- What is an OS?
This lab will introduce you to basic commands used in the terminal. Follow the steps below and
practice each command to understand its function.
pwd
Command: `ls` (List Directory Contents)
ls
Task: Run this command to see all the files and folders in the current directory. Try `ls -l` for more
details.
cd <directory-name>
cd Desktop
Task 2: Use the `pwd` command again to check your new location.
Command: `cd ..` (Move to Parent Directory)
cd ..
Task: Navigate back to the previous directory (parent folder).
Command: `cp`
cp -r <source-folder> <destination-folder>
Task: Copy a folder from the current directory to another directory.
cp -r test backup or
cp -r ~//Desktop/Folder1 ~//Desktop/Folder2
Move Folder to Another Folder
Command: `mv`
mv <source-folder> <destination-folder> or
mv ~//Desktop/Folder1 ~//Desktop/Folder2
Task: Move a folder from one location to another.
mv test test2
touch <file-name>
Task: Create a new empty file.
touch example.txt
Command: `nano` (Text Editor)
nano example.txt
Note: After editing, press `CTRL+X`, then `Y` to save changes, and `Enter` to confirm.
Lab Tasks:
1. Open a terminal and check your current directory using `pwd`.
5. Create two folders (`test` and `backup`) in your current directory using `mkdir <folder-name>`.