Week 2 - Introduction To Linux
Week 2 - Introduction To Linux
Waheed Iqbal
DevOps (Fall 2023)
Department of Data Science, FCIT, University of the Punjab
Lahore, Pakistan
Why Linux
● It is free
● It runs on top 500 supercomputers
● Most of the servers in the world use Linux
● This course requires you to work on Linux!
Linux
● Linux is a family of open-source Unix-like operating systems
● 1991 - Linus Torvalds, introduced first free and open-source Linux
kernel
● Linux is typically packaged as a distribution, which includes the kernel
and supporting system software and libraries
● There are many different distributions of Linux available
Linux vs Unix
● Unix is an operating system that was developed at AT&T's Bell Labs in the
late 1960s and early 1970s. It has various commercial versions, including
AIX, Solaris, HP-UX, and more.
● Linux, on the other hand, is a free and open-source operating system kernel
initially created by Linus Torvalds in 1991. Linux distributions (commonly
known as Linux distros) combine this kernel with various software packages
to create complete operating systems.
Let's have a look at Ubuntu (A Famous
Linux Distribution) environment!
Basic Linux Commands: The Home Directory
Basic Linux Commands: Command and Arguments
Basic Linux Commands
Basic Linux Commands
Basic Linux Commands
Basic Linux Commands
Basic Linux Commands: Reading Files
Let's practice few command for text reading:
● By default, Linux restricts access to certain parts of the system preventing sensitive files
from being compromised.
● The sudo command temporarily elevates privileges allowing users to complete sensitive
tasks without logging in as the root user.
User and Group Management
● useradd bob: create a user bob
● useradd -m bob: create a user bob
and also create its home directory
● groupadd will create a group
● groupdel will delete group
● userdel will delete user
● passwd will allow to change
password
Access Control Files in Linux
● /etc/passwd contains users information
● /etc/shadow contains hashed password
● /etc/group contain group information
File Permissions
File Permissions: chmod
chmod: use to change the permission of the file
File Permissions: chown
Home Work
● Install Ubuntu on your laptop
● Practice different command and get comfortable with linux environment.
● Install packages, and play with files and folders.
● Install apache server and identify different configuration file of apache on the
file system
Next
● GIT - Version Control System
Credit
These slides use material from kodekloud.com