Operating Systems Lab
AI204L
Submission Guidelines
• Answers needs to be submitted in a PDF format
• Take snapshots of code and output and paste in word
document. Convert the word doc into PDF and submit
• Mention your name and registration number on TOP RIGHT
CORNER of the page.
Lab 1: Practice basic linux commands
Aim: Introduction to Basic and Advance commands of Linux.
Basics of Linux OS:
Linux is a multi-user, multitasking operating system that provides a
command-line interface through the shell.
Basic Linux commands are used to interact with the system for
managing files, directories, permissions, and processes.
Understanding these commands is essential for operating system
concepts and system-level programming.
• ls Lists the contents (files and directories) of the current
directory.
• cd - Change directory
• Pwd- Prints the working directory, showing your current location's
full path.
• mkdir [dir] Makes a new directory (folder) in the current location.
• rm - Remove files or directories
• rmdir - Remove empty directory
• touch - creates a new empty file
• cp - copies from one file to another
• mv - move or rename files/ directories
• cat – displays the content of a file
• chmod – changes file permission
• kill – terminates a process
• top- process monitoring
• ssh – secure shell
Sample Problem:
1. Create a directory named oslab
2. Create a file test.txt inside it
3. Write content to the file
4. Change file permission to executable
5. Display running processes
6. Delete the file and directory