Professional Documents
Culture Documents
Lab-2 Introduction To Linux Commands
Lab-2 Introduction To Linux Commands
Week 5
Course Teacher: Dr. Kashif Sattar
Video Link:
https://drive.google.com/file/d/1hQWYILeIaErvLCA-mkVcpKuRcCZVr8uh/view?
usp=sharing
Lab 2: Introduction to Linux Commands
Objective:
Tools/Software Requirement
Linux (Ubuntu)
OR
Run terminal online (signup for creating user):
https://vfsync.org/vm.html?login=1
§ mv Move file
o mv file1.txt file2.txt
Move ‘file1.txt’ in your current dir to ‘file2.txt’ in your current dir
o mv ~/file1.txt ~ /UIIT/courses/file2.txt
Move ‘~/file1.txt’ to ‘~/UIIT/courses/file2.txt’
§ rm Remove file
o rm abc.txt
Remove ‘abc.txt’ from your current directory
o rm ~/UIIT/courses/file2.txt
Remove ‘file2’ in the ‘courses’ dir in your ~/UIIT directory
rm *.o
Remove all .o (i.e., object) files from your current directory
Task 2: Practice Some more useful Linux Commands and take screen shots:
§ touch create file without opening the file
§ vi create/open file for editing
§ Command mode (press esc for that)
§ E.g :wq (for write and quit)
§ Insert mode (press i for that)
§ cat Display contents of a file
§ cat file1 >> file2 copy contents of file1 in file2
§ cmp Compare two files (No message means both files are same)
§ tar -cvf file.tar file1 file2 …..
§ tar -xvf file.tar
§ ifconfig view the configuration of network interfaces
§ ping google.com
§ chmod u=rwx,g=rx,o=r myfile (a=rwx for all)
§ chmod 777 myfile
§ uname information about current system
§ cat /etc/os-release To see the version of linux in detail
§ history display the previous executed commands
§ cal 02 2020 display the calender of feb 2020
§ date display the system date and time
Deliverables:
Upload the document (containing screen shots of your commands execution on
terminal within your user[name must be your name] directory) on google classroom in
Lab2 Assignment.
This lab is graded. Min points: 0 and Max points: 10.
University Institute of Information Technology
Operating System Concepts
CS-583
Lab 2: Introduction to Linux Commands
Lab 2- Solution
Task # 1:
Add your screen shots here
Task # 2:
Add your screen shots here